pub struct Address {
pub display_name: Option<Vec<u8>>,
pub uri: Uri,
pub params: Vec<HeaderParam>,
}Expand description
A display name with a URI and header parameters.
Fields§
§display_name: Option<Vec<u8>>The display name, unquoted and unescaped, if there was one.
uri: UriThe URI.
params: Vec<HeaderParam>The header parameters — those after the URI, outside any angle brackets.
Implementations§
Source§impl Address
impl Address
Sourcepub fn parse(value: &[u8], header: &'static str) -> Result<Self, HeaderError>
pub fn parse(value: &[u8], header: &'static str) -> Result<Self, HeaderError>
Parse one address.
Sourcepub fn parse_list(
value: &[u8],
header: &'static str,
) -> Result<Vec<Self>, HeaderError>
pub fn parse_list( value: &[u8], header: &'static str, ) -> Result<Vec<Self>, HeaderError>
Parse a header value carrying one or more comma-separated addresses.
RFC 3261 §7.3: for Contact, Route and Record-Route a comma-joined row is
exactly equivalent to the same values on separate rows, so the row must be split
before the address grammar applies.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Address
impl RefUnwindSafe for Address
impl Send for Address
impl Sync for Address
impl Unpin for Address
impl UnsafeUnpin for Address
impl UnwindSafe for Address
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