pub struct SipGeolocation(/* private fields */);Expand description
Parsed SIP Geolocation header value (RFC 6442).
Contains one or more <uri> references, comma-separated. Each reference
is classified as either a cid: body-part reference or a dereference URL.
use sip_header::SipGeolocation;
let raw = "<cid:abc-123>, <https://lis.example.com/held/abc>";
let geo = SipGeolocation::parse(raw);
assert_eq!(geo.len(), 2);
assert!(geo.cid().is_some());
assert!(geo.url().is_some());Implementations§
Source§impl SipGeolocation
impl SipGeolocation
Sourcepub fn parse(raw: &str) -> SipGeolocation
pub fn parse(raw: &str) -> SipGeolocation
Parse a raw Geolocation header value into typed references.
Sourcepub fn refs(&self) -> &[SipGeolocationRef]
pub fn refs(&self) -> &[SipGeolocationRef]
The parsed references as a slice.
Trait Implementations§
Source§impl Clone for SipGeolocation
impl Clone for SipGeolocation
Source§fn clone(&self) -> SipGeolocation
fn clone(&self) -> SipGeolocation
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SipGeolocation
impl Debug for SipGeolocation
Source§impl Display for SipGeolocation
impl Display for SipGeolocation
Source§impl<'a> IntoIterator for &'a SipGeolocation
impl<'a> IntoIterator for &'a SipGeolocation
Source§type Item = &'a SipGeolocationRef
type Item = &'a SipGeolocationRef
The type of the elements being iterated over.
Source§type IntoIter = Iter<'a, SipGeolocationRef>
type IntoIter = Iter<'a, SipGeolocationRef>
Which kind of iterator are we turning this into?
Source§fn into_iter(self) -> <&'a SipGeolocation as IntoIterator>::IntoIter
fn into_iter(self) -> <&'a SipGeolocation as IntoIterator>::IntoIter
Creates an iterator from a value. Read more
Source§impl IntoIterator for SipGeolocation
impl IntoIterator for SipGeolocation
Source§type Item = SipGeolocationRef
type Item = SipGeolocationRef
The type of the elements being iterated over.
Source§type IntoIter = IntoIter<SipGeolocationRef>
type IntoIter = IntoIter<SipGeolocationRef>
Which kind of iterator are we turning this into?
Source§fn into_iter(self) -> <SipGeolocation as IntoIterator>::IntoIter
fn into_iter(self) -> <SipGeolocation as IntoIterator>::IntoIter
Creates an iterator from a value. Read more
Source§impl PartialEq for SipGeolocation
impl PartialEq for SipGeolocation
impl Eq for SipGeolocation
impl StructuralPartialEq for SipGeolocation
Auto Trait Implementations§
impl Freeze for SipGeolocation
impl RefUnwindSafe for SipGeolocation
impl Send for SipGeolocation
impl Sync for SipGeolocation
impl Unpin for SipGeolocation
impl UnsafeUnpin for SipGeolocation
impl UnwindSafe for SipGeolocation
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.