pub struct Incompatible { /* private fields */ }Expand description
Unsupported configurations for an incompatible BSS with respect to a scanning interface.
Describes disjoint features between an incompatible BSS and a local scanning interface that
prevent establishing a connection. Information about modes of operation is best effort;
Incompatible may provide no additional information at all.
Implementations§
Source§impl Incompatible
impl Incompatible
Sourcepub fn from_description(description: impl Into<Cow<'static, str>>) -> Self
pub fn from_description(description: impl Into<Cow<'static, str>>) -> Self
Constructs an Incompatible from a description with no feature information.
Sourcepub fn try_from_features(
description: impl Into<Cow<'static, str>>,
disjoint_security_protocols: Option<impl IntoIterator<Item = (SecurityDescriptor, MacRole)>>,
) -> Option<Self>
pub fn try_from_features( description: impl Into<Cow<'static, str>>, disjoint_security_protocols: Option<impl IntoIterator<Item = (SecurityDescriptor, MacRole)>>, ) -> Option<Self>
Constructs an Incompatible from a description and disjoint features.
Returns None if any given features are not disjoint. For example, None is returned
if a security protocol appears more than once with differing roles, because this implies
compatibility (a mutually supported security protocol).
Note that the features considered by Incompatible depend on the needs of downstream code
and may change. This function accepts parameters that represent only these features, which
may be as few in number as one and may grow to many.
Sourcepub const fn unknown() -> Compatibility
pub const fn unknown() -> Compatibility
Constructs a Compatibility from an Incompatible with no feature information.
Sourcepub fn expect_err(
description: impl Into<Cow<'static, str>>,
disjoint_security_protocols: Option<impl IntoIterator<Item = (SecurityDescriptor, MacRole)>>,
) -> Compatibility
pub fn expect_err( description: impl Into<Cow<'static, str>>, disjoint_security_protocols: Option<impl IntoIterator<Item = (SecurityDescriptor, MacRole)>>, ) -> Compatibility
Constructs a Compatibility from an Incompatible from disjoint features.
While this function presents a fallible interface and returns a Compatibility (Result),
it panics on failure and never returns Ok. This can be used when a Compatibility is
needed but it is important to assert that it is incompatible (Err), most notably in tests.
See Incompatible::try_from_features.
§Panics
Panics if an Incompatible cannot be constructed from the given disjoint features. This
occurs if Incompatible::try_from_features returns None.
Sourcepub fn disjoint_security_protocols(
&self,
) -> Option<&HashMap<SecurityDescriptor, MacRole>>
pub fn disjoint_security_protocols( &self, ) -> Option<&HashMap<SecurityDescriptor, MacRole>>
Gets the sets of disjoint security protocols, if any.
The disjoint sets are represented as a map from SecurityDescriptor to MacRole, where
each security protocol is supported only by one station in a particular role (e.g., client
and AP). There is a disjoint set of security protocols for each unique role in the map.
Returns None if no security protocol incompatibility has been detected. When Some but
with an empty map, security protocol support is considered incompatible even though the
protocols are not described.
Trait Implementations§
Source§impl Clone for Incompatible
impl Clone for Incompatible
Source§fn clone(&self) -> Incompatible
fn clone(&self) -> Incompatible
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more