pub struct Contact(pub Address);Expand description
The Contact header (RFC 3261 §20.10).
A Contact of * is legal in a REGISTER and is not an address; parse it with
ContactValue rather than this type.
Tuple Fields§
§0: AddressImplementations§
Source§impl Contact
impl Contact
Sourcepub fn parse_list(value: &[u8]) -> Result<Vec<Self>, HeaderError>
pub fn parse_list(value: &[u8]) -> Result<Vec<Self>, HeaderError>
Parse a header value that may carry several comma-separated addresses.
Trait Implementations§
Source§impl TypedHeader for Contact
impl TypedHeader for Contact
Source§fn decode(value: &[u8]) -> Result<Self, HeaderError>
fn decode(value: &[u8]) -> Result<Self, HeaderError>
Decodes the first address in the value; use Self::parse_list or
crate::message::Headers::typed_all when every one is needed.
Source§const NAME: HeaderName = HeaderName::Contact
const NAME: HeaderName = HeaderName::Contact
The header this type reads.
Source§fn decode_list(value: &[u8]) -> Result<Vec<Self>, HeaderError>
fn decode_list(value: &[u8]) -> Result<Vec<Self>, HeaderError>
Parse every value in one header row. Read more
Source§const VALIDATE_LIST: bool = false
const VALIDATE_LIST: bool = false
Whether
Headers::typed_all must collect and validate the complete field before yielding. Read moreSource§fn validate_list(_values: &[&Self]) -> Result<(), HeaderError>
fn validate_list(_values: &[&Self]) -> Result<(), HeaderError>
Validate all decoded values of this field across the complete message. Read more
Auto Trait Implementations§
impl !Freeze for Contact
impl RefUnwindSafe for Contact
impl Send for Contact
impl Sync for Contact
impl Unpin for Contact
impl UnsafeUnpin for Contact
impl UnwindSafe for Contact
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more