pub struct PauseCapability {
pub nowait: bool,
pub config: u8,
}Expand description
What a negotiated ccm pause line says (RFC 7728 section 9, Figure 8): pause, then
nowait and config=<n> in any order; unknown attributes are ignored (“Unknown pause
attributes MUST be ignored”).
Fields§
§nowait: boolnowait: the hold-off period is 0.
config: u8config, 1 when left out.
Implementations§
Source§impl PauseCapability
impl PauseCapability
Sourcepub fn parse(parameter: &str) -> Option<Self>
pub fn parse(parameter: &str) -> Option<Self>
Parses the parameter of a ccm feedback line (pause nowait config=3); None when it
is not pause, or names config or nowait more than once (“MUST NOT appear more
than once”), or config is not a number.
Sourcepub fn parameter(&self) -> String
pub fn parameter(&self) -> String
The line’s parameter: pause, nowait when set, config when not 1.
Sourcepub fn negotiate(local: &Self, remote: &Self) -> Option<Self>
pub fn negotiate(local: &Self, remote: &Self) -> Option<Self>
The negotiated capability of this endpoint from its own line (local) and the peer’s
(remote), as an answer states it (section 9.1): this endpoint implements every
message, so its config is the one complementary to the peer’s, and nowait holds
only when both lines have it. None when the peer’s config is not one the section
defines.