#[non_exhaustive]pub struct SipAccept(/* private fields */);Expand description
Parsed SIP Accept header value.
Implementations§
Source§impl SipAccept
impl SipAccept
Sourcepub fn parse(raw: &str) -> Result<Self, SipAcceptError>
pub fn parse(raw: &str) -> Result<Self, SipAcceptError>
Parse a comma-separated Accept header value.
An empty or whitespace-only value is the empty list (RFC 3261 §25.1).
Sourcepub fn from_entries<'a>(
entries: impl IntoIterator<Item = &'a str>,
) -> Result<Self, SipAcceptError>
pub fn from_entries<'a>( entries: impl IntoIterator<Item = &'a str>, ) -> Result<Self, SipAcceptError>
Build from entries a transport already split; each is one accept-range.
No entries, or only blank ones, is the empty list; a blank entry beside a real one is an error.
Sourcepub fn entries(&self) -> &[SipAcceptEntry]
pub fn entries(&self) -> &[SipAcceptEntry]
The parsed entries as a slice.
Sourcepub fn into_entries(self) -> Vec<SipAcceptEntry>
pub fn into_entries(self) -> Vec<SipAcceptEntry>
Consume self and return entries as a Vec.
Trait Implementations§
impl Eq for SipAccept
Source§impl<'a> IntoIterator for &'a SipAccept
impl<'a> IntoIterator for &'a SipAccept
Source§impl IntoIterator for SipAccept
impl IntoIterator for SipAccept
impl StructuralPartialEq for SipAccept
Auto Trait Implementations§
impl Freeze for SipAccept
impl RefUnwindSafe for SipAccept
impl Send for SipAccept
impl Sync for SipAccept
impl Unpin for SipAccept
impl UnsafeUnpin for SipAccept
impl UnwindSafe for SipAccept
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