pub struct Support { /* private fields */ }Expand description
What a registrar said about push, read from the Feature-Caps of a REGISTER response (§8.2).
The interesting question this answers is not “did the registration succeed” — it did, or there would be no response to read. It is “can this registrar actually wake me”, and the two come apart: a registrar that supports some other push service answers 200 and records a perfectly good binding that nothing will ever ring. That failure looks exactly like success from every angle except this one.
Implementations§
Source§impl Support
impl Support
Sourcepub fn from_response(response: &Response) -> Self
pub fn from_response(response: &Response) -> Self
Read what a REGISTER response said about push (§8.2).
Every Feature-Caps row is read, because a registrar offering several push services says
so with several indicators and a client that stopped at the first would miss its own.
Sourcepub fn services(&self) -> &[String]
pub fn services(&self) -> &[String]
The push notification services the registrar named (§8.2’s sip.pns).
Sourcepub fn supports(&self, provider: &str) -> bool
pub fn supports(&self, provider: &str) -> bool
Whether the registrar named this push service.
The question a client has to ask after every registration, and the reason sip.pns exists.
false does not mean the registration failed — it means the binding is one nothing will
wake, and a client that never asks will sit there believing it is reachable.
Compared case-insensitively: §8.8’s registry values are tokens.
Sourcepub fn refreshes_required(&self) -> bool
pub fn refreshes_required(&self) -> bool
Whether the registrar asked for binding refreshes even without a push (§8.2’s
sip.pnsreg).
Sourcepub fn refresh_interval(&self) -> Option<Duration>
pub fn refresh_interval(&self) -> Option<Duration>
How long to leave between those refreshes, when the registrar said a readable number.
None alongside a true Support::refreshes_required means the registrar asked for
refreshes without naming an interval this side could read; the lease’s own refresh point
still applies.
Sourcepub fn purr(&self) -> Option<&str>
pub fn purr(&self) -> Option<&str>
The PURR the registrar assigned this binding (§8.2’s sip.pnspurr).
Carried, not acted on. A PURR exists so that a request can be matched to a stored
binding without re-deriving it from the pn-* values, and the party that stores bindings
is the registrar or the proxy of §5.6 — not a user agent, which has exactly one. sipx
therefore reads it, keeps it, and hands it to the application, and does no matching with
it; that half arrives with the proxy role or not at all.
Trait Implementations§
impl Eq for Support
impl StructuralPartialEq for Support
Auto Trait Implementations§
impl Freeze for Support
impl RefUnwindSafe for Support
impl Send for Support
impl Sync for Support
impl Unpin for Support
impl UnsafeUnpin for Support
impl UnwindSafe for Support
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more