pub struct Compatible { /* private fields */ }
Expand description
Supported configurations for a compatible BSS with respect to a scanning interface.
Describes the mutually supported features between a compatible BSS and a local scanning interface that can be negotiated and/or used to establish a connection.
Implementations§
Source§impl Compatible
impl Compatible
Sourcepub fn try_from_features(
mutual_security_protocols: impl IntoIterator<Item = SecurityDescriptor>,
) -> Option<Self>
pub fn try_from_features( mutual_security_protocols: impl IntoIterator<Item = SecurityDescriptor>, ) -> Option<Self>
Constructs a Compatible
from mutually supported features.
Returns None
if any set of mutually supported features is empty, because this implies
incompatibility.
Note that the features considered by Compatible
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 fn expect_ok(
mutual_security_protocols: impl IntoIterator<Item = SecurityDescriptor>,
) -> Compatibility
pub fn expect_ok( mutual_security_protocols: impl IntoIterator<Item = SecurityDescriptor>, ) -> Compatibility
Constructs a Compatibility
from a Compatible
from mutually supported features.
While this function presents a fallible interface and returns a Compatibility
(Result
),
it panics on failure and never returns Err
. This can be used when a Compatibility
is
needed but it is important to assert that it is compatible (Ok
), most notably in tests.
See Compatible::try_from_features
.
§Panics
Panics if a Compatible
cannot be constructed from the given mutually supported features.
This occurs if Compatible::try_from_features
returns None
.
Sourcepub fn mutual_security_protocols(&self) -> &HashSet<SecurityDescriptor>
pub fn mutual_security_protocols(&self) -> &HashSet<SecurityDescriptor>
Gets the set of mutually supported security protocols.
This set represents the intersection of security protocols supported by the BSS and the scanning interface. In this context, this set is never empty, as that would imply incompatibility.
Trait Implementations§
Source§impl Clone for Compatible
impl Clone for Compatible
Source§fn clone(&self) -> Compatible
fn clone(&self) -> Compatible
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more