/* This Source Code Form is subject to the terms of the Mozilla Public *License,v.2.0.IfacopyoftheMPLwasnotdistributedwiththis
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use address::{Address, AddressType}; use error::SdpParserInternalError; use std::net::IpAddr; use std::str::FromStr;
pubfn parse_network_type(value: &str) -> Result<(), SdpParserInternalError> { if value.to_uppercase() != "IN" { return Err(SdpParserInternalError::Generic( "nettype must be IN".to_string(),
));
};
Ok(())
}
pubfn parse_address_type(value: &str) -> Result<AddressType, SdpParserInternalError> {
AddressType::from_str(value.to_uppercase().as_str())
.map_err(|_| SdpParserInternalError::Generic("address type must be IP4 or IP6".to_string()))
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.