pub struct Indicators { /* private fields */ }Expand description
The push feature-capability indicators one Feature-Caps value carries (§8.2).
RFC 6809 §4 gives the header the shape * followed by ;-separated indicators, and RFC 8599
§8.2 registers three of them that a client cares about. Indicators belonging to other
mechanisms are ignored rather than rejected — that is what an extensible list is for, and a
parser that failed on an unknown one would break against every proxy that grows a feature.
This models one value. A registrar may send several, on one row or on several; read them with
crate::message::Headers::typed_all, which treats those two spellings as the same message.
Implementations§
Source§impl Indicators
impl Indicators
Sourcepub fn pns(&self) -> Option<&[u8]>
pub fn pns(&self) -> Option<&[u8]>
The push notification service this value names (§8.2’s sip.pns).
This is the answer to “does this registrar support the service I asked for”. A registrar naming a different one has not refused the registration — it has accepted a binding that nothing will ever wake, which is worse, because it looks like success.
Sourcepub fn refreshes_required(&self) -> bool
pub fn refreshes_required(&self) -> bool
Whether the registrar asked for binding refreshes even in the absence of a push (§8.2’s
sip.pnsreg).
Presence is a fact of its own, separate from the interval: an indicator sent with a value this side cannot read still says the registrar wants refreshes, and treating it as absent would let the binding lapse.
Sourcepub fn refresh_interval(&self) -> Option<Duration>
pub fn refresh_interval(&self) -> Option<Duration>
How long the registrar said to leave between those refreshes (§8.2’s sip.pnsreg).
None when the indicator is absent and when its value is not a number of seconds; see
Indicators::refreshes_required for the difference.
Trait Implementations§
Source§impl Clone for Indicators
impl Clone for Indicators
Source§fn clone(&self) -> Indicators
fn clone(&self) -> Indicators
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for Indicators
impl Debug for Indicators
Source§impl Default for Indicators
impl Default for Indicators
Source§fn default() -> Indicators
fn default() -> Indicators
Source§impl PartialEq for Indicators
impl PartialEq for Indicators
Source§fn eq(&self, other: &Indicators) -> bool
fn eq(&self, other: &Indicators) -> bool
self and other values to be equal, and is used by ==.Source§impl TypedHeader for Indicators
impl TypedHeader for Indicators
Source§fn decode(value: &[u8]) -> Result<Self, HeaderError>
fn decode(value: &[u8]) -> Result<Self, HeaderError>
Decodes the first value in the row; use
crate::message::Headers::typed_all when every one is needed.
Source§const NAME: HeaderName = HeaderName::FeatureCaps
const NAME: HeaderName = HeaderName::FeatureCaps
Source§fn decode_list(value: &[u8]) -> Result<Vec<Self>, HeaderError>
fn decode_list(value: &[u8]) -> Result<Vec<Self>, HeaderError>
Source§const VALIDATE_LIST: bool = false
const VALIDATE_LIST: bool = false
Headers::typed_all must collect and validate the complete field before yielding. Read more