pub struct NetCtlWithStatusImpl<'a, T> { /* private fields */ }Expand description
A wrapper around a NetCtl network controller that additionally implements the NetCtlStatustrait.
Implementations§
Source§impl<'a, T> NetCtlWithStatusImpl<'a, T>
impl<'a, T> NetCtlWithStatusImpl<'a, T>
Sourcepub const fn new(
state: &'a Mutex<RefCell<NetCtlState>>,
net_ctl: T,
) -> NetCtlWithStatusImpl<'a, T>
pub const fn new( state: &'a Mutex<RefCell<NetCtlState>>, net_ctl: T, ) -> NetCtlWithStatusImpl<'a, T>
Create a new instance of NetCtlWithStatusImpl.
§Arguments
state: A reference to aNetCtlStateinstance wrapped in a mutexnet_ctl: A network controller that implements theNetCtltrait
Trait Implementations§
impl<T> DynBase for NetCtlWithStatusImpl<'_, T>
Available on non-crate feature
sync-mutex only.Source§impl<T> NetChangeNotif for NetCtlWithStatusImpl<'_, T>where
T: NetChangeNotif,
impl<T> NetChangeNotif for NetCtlWithStatusImpl<'_, T>where
T: NetChangeNotif,
Source§async fn wait_changed(&self)
async fn wait_changed(&self)
Wait until a change occurs.
Source§impl<T> NetCtl for NetCtlWithStatusImpl<'_, T>where
T: NetCtl,
impl<T> NetCtl for NetCtlWithStatusImpl<'_, T>where
T: NetCtl,
Source§fn net_type(&self) -> NetworkType
fn net_type(&self) -> NetworkType
Return the network type of the implementation
Source§fn connect_max_time_seconds(&self) -> u8
fn connect_max_time_seconds(&self) -> u8
Return the maximum time in seconds for connecting to a network Read more
Source§fn scan_max_time_seconds(&self) -> u8
fn scan_max_time_seconds(&self) -> u8
Return the maximum time in seconds for scanning for networks Read more
Source§fn supported_wifi_bands<F>(&self, f: F) -> Result<(), Error>
fn supported_wifi_bands<F>(&self, f: F) -> Result<(), Error>
Return the supported WiFi bands for the implementation in the provided closure Read more
Source§fn supported_thread_features(&self) -> ThreadCapabilitiesBitmap
fn supported_thread_features(&self) -> ThreadCapabilitiesBitmap
Return the supported Thread features for the implementation Read more
Source§fn thread_version(&self) -> u16
fn thread_version(&self) -> u16
Return the Thread version for the implementation Read more
Source§async fn scan<F>(&self, network: Option<&[u8]>, f: F) -> Result<(), NetCtlError>
async fn scan<F>(&self, network: Option<&[u8]>, f: F) -> Result<(), NetCtlError>
Scan for networks and call the provided function for each network found Read more
Source§async fn connect(&self, creds: &WirelessCreds<'_>) -> Result<(), NetCtlError>
async fn connect(&self, creds: &WirelessCreds<'_>) -> Result<(), NetCtlError>
Connect to the network with the given credentials Read more
Source§impl<T> NetCtlStatus for NetCtlWithStatusImpl<'_, T>where
T: NetCtl,
impl<T> NetCtlStatus for NetCtlWithStatusImpl<'_, T>where
T: NetCtl,
Source§fn last_networking_status(
&self,
) -> Result<Option<NetworkCommissioningStatusEnum>, Error>
fn last_networking_status( &self, ) -> Result<Option<NetworkCommissioningStatusEnum>, Error>
Return the networking status of the last scan or connect operation Read more
Source§impl<T> ThreadDiag for NetCtlWithStatusImpl<'_, T>where
T: ThreadDiag,
impl<T> ThreadDiag for NetCtlWithStatusImpl<'_, T>where
T: ThreadDiag,
fn channel(&self) -> Result<Option<u16>, Error>
fn routing_role(&self) -> Result<Option<RoutingRoleEnum>, Error>
fn network_name( &self, f: &mut dyn FnMut(Option<&str>) -> Result<(), Error>, ) -> Result<(), Error>
fn pan_id(&self) -> Result<Option<u16>, Error>
fn extended_pan_id(&self) -> Result<Option<u64>, Error>
fn mesh_local_prefix( &self, f: &mut dyn FnMut(Option<&[u8]>) -> Result<(), Error>, ) -> Result<(), Error>
fn neighbor_table( &self, f: &mut dyn FnMut(&NeighborTable) -> Result<(), Error>, ) -> Result<(), Error>
fn route_table( &self, f: &mut dyn FnMut(&RouteTable) -> Result<(), Error>, ) -> Result<(), Error>
fn partition_id(&self) -> Result<Option<u32>, Error>
fn weighting(&self) -> Result<Option<u16>, Error>
fn data_version(&self) -> Result<Option<u16>, Error>
fn stable_data_version(&self) -> Result<Option<u16>, Error>
fn leader_router_id(&self) -> Result<Option<u8>, Error>
fn security_policy(&self) -> Result<Option<SecurityPolicy>, Error>
fn channel_page0_mask( &self, f: &mut dyn FnMut(Option<&[u8]>) -> Result<(), Error>, ) -> Result<(), Error>
fn operational_dataset_components( &self, f: &mut dyn FnMut(Option<&OperationalDatasetComponents>) -> Result<(), Error>, ) -> Result<(), Error>
fn active_network_faults_list( &self, f: &mut dyn FnMut(NetworkFaultEnum) -> Result<(), Error>, ) -> Result<(), Error>
Source§fn mac_counters(
&self,
f: &mut dyn FnMut(Option<&MacCounters>) -> Result<(), Error>,
) -> Result<(), Error>
fn mac_counters( &self, f: &mut dyn FnMut(Option<&MacCounters>) -> Result<(), Error>, ) -> Result<(), Error>
Lend a snapshot of the IEEE 802.15.4 MAC counters (the cluster’s
MACCounts feature set) to the provided closure, or call it with
None if the backend does not track them - in which case the
corresponding attributes read as unsupported. Read morefn ext_address(&self) -> Result<Option<u64>, Error>
fn rloc_16(&self) -> Result<Option<u16>, Error>
Source§impl<T> WifiDiag for NetCtlWithStatusImpl<'_, T>where
T: WifiDiag,
impl<T> WifiDiag for NetCtlWithStatusImpl<'_, T>where
T: WifiDiag,
fn bssid( &self, f: &mut dyn FnMut(Option<&[u8]>) -> Result<(), Error>, ) -> Result<(), Error>
fn security_type(&self) -> Result<Maybe<SecurityTypeEnum, AsNullable>, Error>
fn wi_fi_version(&self) -> Result<Maybe<WiFiVersionEnum, AsNullable>, Error>
fn channel_number(&self) -> Result<Maybe<u16, AsNullable>, Error>
fn rssi(&self) -> Result<Maybe<i8, AsNullable>, Error>
Source§impl<T> WirelessDiag for NetCtlWithStatusImpl<'_, T>where
T: WirelessDiag,
impl<T> WirelessDiag for NetCtlWithStatusImpl<'_, T>where
T: WirelessDiag,
Auto Trait Implementations§
impl<'a, T> !RefUnwindSafe for NetCtlWithStatusImpl<'a, T>
impl<'a, T> !Send for NetCtlWithStatusImpl<'a, T>
impl<'a, T> !Sync for NetCtlWithStatusImpl<'a, T>
impl<'a, T> !UnwindSafe for NetCtlWithStatusImpl<'a, T>
impl<'a, T> Freeze for NetCtlWithStatusImpl<'a, T>where
T: Freeze,
impl<'a, T> Unpin for NetCtlWithStatusImpl<'a, T>where
T: Unpin,
impl<'a, T> UnsafeUnpin for NetCtlWithStatusImpl<'a, T>where
T: UnsafeUnpin,
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
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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> ⓘ
Converts
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> ⓘ
Converts
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 moreSource§impl<T, I> IntoFallibleInit<T> for Iwhere
I: Init<T>,
impl<T, I> IntoFallibleInit<T> for Iwhere
I: Init<T>,
Source§fn into_fallible<E>(self) -> impl Init<T, E>
fn into_fallible<E>(self) -> impl Init<T, E>
Convert the infallible initializer to a fallible one.
Source§impl<Source, Target> OctetsInto<Target> for Sourcewhere
Target: OctetsFrom<Source>,
impl<Source, Target> OctetsInto<Target> for Sourcewhere
Target: OctetsFrom<Source>,
type Error = <Target as OctetsFrom<Source>>::Error
Source§fn try_octets_into(
self,
) -> Result<Target, <Source as OctetsInto<Target>>::Error>
fn try_octets_into( self, ) -> Result<Target, <Source as OctetsInto<Target>>::Error>
Performs the conversion.
Source§fn octets_into(self) -> Target
fn octets_into(self) -> Target
Performs an infallible conversion.