pub struct NetworkConfig {
pub ssid: Ssid,
pub security_type: SecurityType,
pub credential: Credential,
pub has_ever_connected: bool,
pub hidden_probability: f32,
pub perf_stats: PerformanceStats,
/* private fields */
}Expand description
Saved data for networks, to remember how to connect to a network and determine if we should.
Fields§
§ssid: Ssid(persist) SSID and security type to identify a network.
security_type: SecurityType§credential: Credential(persist) Credential to connect to a protected network or None if the network is open.
has_ever_connected: bool(persist) Remember whether our network indentifier and credential work.
How confident we are that this network is hidden, between 0 and 1. We will use this number to probabilistically perform an active scan for the network. This is persisted to maintain consistent behavior between reboots. 0 means not hidden.
perf_stats: PerformanceStatsUsed to estimate quality to determine whether we want to choose this network.
Implementations§
Source§impl NetworkConfig
impl NetworkConfig
Sourcepub fn new(
id: NetworkIdentifier,
credential: Credential,
has_ever_connected: bool,
) -> Result<Self, NetworkConfigError>
pub fn new( id: NetworkIdentifier, credential: Credential, has_ever_connected: bool, ) -> Result<Self, NetworkConfigError>
A new network config is created by loading from persistent storage on boot or when a new network is saved.
pub fn update_seen_multiple_bss(&mut self, multi_bss: bool)
Sourcepub fn is_likely_single_bss(&self) -> bool
pub fn is_likely_single_bss(&self) -> bool
We say that a BSS is likely a single-BSS network if only 1 BSS has ever been seen at a time for the network and there have been at least some number of scans for the network.
Trait Implementations§
Source§impl Clone for NetworkConfig
impl Clone for NetworkConfig
Source§fn clone(&self) -> NetworkConfig
fn clone(&self) -> NetworkConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for NetworkConfig
impl Debug for NetworkConfig
Source§impl From<&NetworkConfig> for NetworkConfig
impl From<&NetworkConfig> for NetworkConfig
Source§fn from(network_config: &NetworkConfig) -> Self
fn from(network_config: &NetworkConfig) -> Self
Source§impl From<NetworkConfig> for NetworkConfig
impl From<NetworkConfig> for NetworkConfig
Source§fn from(config: NetworkConfig) -> Self
fn from(config: NetworkConfig) -> Self
Source§impl From<NetworkConfig> for PersistentStorageData
impl From<NetworkConfig> for PersistentStorageData
Source§fn from(item: NetworkConfig) -> Self
fn from(item: NetworkConfig) -> Self
Source§impl PartialEq for NetworkConfig
impl PartialEq for NetworkConfig
impl StructuralPartialEq for NetworkConfig
Auto Trait Implementations§
impl Freeze for NetworkConfig
impl RefUnwindSafe for NetworkConfig
impl Send for NetworkConfig
impl Sync for NetworkConfig
impl Unpin for NetworkConfig
impl UnwindSafe for NetworkConfig
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,
Source§impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
Source§impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
§impl<T> InstanceFromServiceTransport<T> for T
impl<T> InstanceFromServiceTransport<T> for T
§fn from_service_transport(handle: T) -> T
fn from_service_transport(handle: T) -> T
T to [Self]§impl<T> IntoAny for T
impl<T> IntoAny for T
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