pub struct ConnectionInformation {
pub network_type: String,
pub address_type: String,
pub address: Option<Address>,
}Expand description
ConnectionInformation defines the representation for the “c=” field containing connection data.
Fields§
§network_type: StringThe network type, always IN (Internet) in practice.
address_type: StringThe address type, IP4 or IP6.
address: Option<Address>The connection address. The grammar requires one: the parser always sets it, and a description built without one is not valid SDP.
Implementations§
Source§impl ConnectionInformation
impl ConnectionInformation
Sourcepub fn parse(value: &str) -> Result<Self>
pub fn parse(value: &str) -> Result<Self>
Parses the value of a c= line: nettype SP addrtype SP connection-address.
The network and address types are tokens: RFC 8866 section 5.7 lets more be
registered than IN, IP4 and IP6, so an unknown one is kept, with its address
unchecked beyond being free of white space. For IP4 and IP6 the address is
checked against the grammar: a unicast address has no / (section 5.7: “the slash
notation … MUST NOT be used for IP unicast addresses”), an IPv4 multicast address
has a TTL of 0 to 255, an IPv6 one has none.