Skip to main content

NetCtlWithStatusImpl

Struct NetCtlWithStatusImpl 

Source
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>

Source

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 a NetCtlState instance wrapped in a mutex
  • net_ctl: A network controller that implements the NetCtl trait

Trait Implementations§

Source§

impl<T> DynBase for NetCtlWithStatusImpl<'_, T>

Available on non-crate feature sync-mutex only.
Source§

impl<T> NetChangeNotif for NetCtlWithStatusImpl<'_, T>
where T: NetChangeNotif,

Source§

async fn wait_changed(&self)

Wait until a change occurs.
Source§

impl<T> NetCtl for NetCtlWithStatusImpl<'_, T>
where T: NetCtl,

Source§

fn net_type(&self) -> NetworkType

Return the network type of the implementation
Source§

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

Return the maximum time in seconds for scanning for networks Read more
Source§

fn supported_wifi_bands<F>(&self, f: F) -> Result<(), Error>
where F: FnMut(WiFiBandEnum) -> Result<(), Error>,

Return the supported WiFi bands for the implementation in the provided closure Read more
Source§

fn supported_thread_features(&self) -> ThreadCapabilitiesBitmap

Return the supported Thread features for the implementation Read more
Source§

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>
where F: FnMut(&NetworkScanInfo<'_>) -> Result<(), Error>,

Scan for networks and call the provided function for each network found Read more
Source§

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,

Source§

fn last_networking_status( &self, ) -> Result<Option<NetworkCommissioningStatusEnum>, Error>

Return the networking status of the last scan or connect operation Read more
Source§

fn last_network_id<F, R>(&self, f: F) -> Result<R, Error>
where F: FnOnce(Option<&[u8]>) -> Result<R, Error>,

Return the network ID of the last connect operation Read more
Source§

fn last_connect_error_value(&self) -> Result<Option<i32>, Error>

Return the error value of the last connect operation Read more
Source§

impl<T> ThreadDiag for NetCtlWithStatusImpl<'_, T>
where T: ThreadDiag,

Source§

fn channel(&self) -> Result<Option<u16>, Error>

Source§

fn routing_role(&self) -> Result<Option<RoutingRoleEnum>, Error>

Source§

fn network_name( &self, f: &mut dyn FnMut(Option<&str>) -> Result<(), Error>, ) -> Result<(), Error>

Source§

fn pan_id(&self) -> Result<Option<u16>, Error>

Source§

fn extended_pan_id(&self) -> Result<Option<u64>, Error>

Source§

fn mesh_local_prefix( &self, f: &mut dyn FnMut(Option<&[u8]>) -> Result<(), Error>, ) -> Result<(), Error>

Source§

fn neighbor_table( &self, f: &mut dyn FnMut(&NeighborTable) -> Result<(), Error>, ) -> Result<(), Error>

Source§

fn route_table( &self, f: &mut dyn FnMut(&RouteTable) -> Result<(), Error>, ) -> Result<(), Error>

Source§

fn partition_id(&self) -> Result<Option<u32>, Error>

Source§

fn weighting(&self) -> Result<Option<u16>, Error>

Source§

fn data_version(&self) -> Result<Option<u16>, Error>

Source§

fn stable_data_version(&self) -> Result<Option<u16>, Error>

Source§

fn leader_router_id(&self) -> Result<Option<u8>, Error>

Source§

fn security_policy(&self) -> Result<Option<SecurityPolicy>, Error>

Source§

fn channel_page0_mask( &self, f: &mut dyn FnMut(Option<&[u8]>) -> Result<(), Error>, ) -> Result<(), Error>

Source§

fn operational_dataset_components( &self, f: &mut dyn FnMut(Option<&OperationalDatasetComponents>) -> Result<(), Error>, ) -> Result<(), Error>

Source§

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>

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 more
Source§

fn ext_address(&self) -> Result<Option<u64>, Error>

Source§

fn rloc_16(&self) -> Result<Option<u16>, Error>

Source§

impl<T> WifiDiag for NetCtlWithStatusImpl<'_, T>
where T: WifiDiag,

Source§

impl<T> WirelessDiag for NetCtlWithStatusImpl<'_, T>
where T: WirelessDiag,

Source§

fn connected(&self) -> Result<bool, Error>

Returns true if the device is connected to a wireless network

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, E> Init<T, E> for T

Source§

unsafe fn __init(self, slot: *mut T) -> Result<(), E>

Initializes slot. Read more
Source§

fn chain<F>(self, f: F) -> ChainInit<Self, F, T, E>
where F: FnOnce(&mut T) -> Result<(), E>,

First initializes the value using self then calls the function f with the initialized value. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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 more
Source§

impl<T, I> IntoFallibleInit<T> for I
where I: Init<T>,

Source§

fn into_fallible<E>(self) -> impl Init<T, E>

Convert the infallible initializer to a fallible one.
Source§

impl<Source, Target> OctetsInto<Target> for Source
where Target: OctetsFrom<Source>,

Source§

type Error = <Target as OctetsFrom<Source>>::Error

Source§

fn try_octets_into( self, ) -> Result<Target, <Source as OctetsInto<Target>>::Error>

Performs the conversion.
Source§

fn octets_into(self) -> Target
where Self::Error: Into<Infallible>,

Performs an infallible conversion.
Source§

impl<T, E> PinInit<T, E> for T

Source§

unsafe fn __pinned_init(self, slot: *mut T) -> Result<(), E>

Initializes slot. Read more
Source§

fn pin_chain<F>(self, f: F) -> ChainPinInit<Self, F, T, E>
where F: FnOnce(Pin<&mut T>) -> Result<(), E>,

First initializes the value using self then calls the function f with the initialized value. Read more
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V