/// We implement `Deserialize` for all of the event types so that we can more easily parse the CMAP
/// spec tests. However, we have no need to parse the address field from the JSON files (if it's
/// even present). To facilitate populating the address field with an empty value when
/// deserializing, we define a private `empty_address` function that the events can specify as the
/// custom deserialization value for each address field.
We implement `Deserialize` for all of the event types so that we can more easily parse the CMAP
spec tests. However, we have no need to parse the address field from the JSON files (if it's
even present). To facilitate populating the address field with an empty value when
deserializing, we define a private `empty_address` function that the events can specify as the
custom deserialization value for each address field.
We implement ` Deserialize ` for all of the event types so that we can more easily parse the CMAP spec tests . However we have no need to parse the address field from the JSON files ( if it ' s even present ) . To facilitate populating the address field with an empty value when deserializing we define a private ` empty_address ` function that the events can specify as the custom deserialization value for each address field .
fn empty_address() -> ServerAddress {
    ServerAddress::Tcp {
        host: Default::default(),
        port: None,
    }
}
fn empty_address ( ) -> ServerAddress { ServerAddress :: Tcp { host : Default :: default ( ) , port : None , } }
We implement `Deserialize` for all of the event types so that we can more easily parse the CMAP
spec tests.
We implement ` Deserialize ` for all of the event types so that we can more easily parse the CMAP spec tests .