pub struct StateRunner<'d> { /* private fields */ }Expand description
State runner.
Holds the shared state of the channel such as link state.
Implementations§
Source§impl StateRunner<'_>
impl StateRunner<'_>
Sourcepub fn set_link_state(&self, state: LinkState)
pub fn set_link_state(&self, state: LinkState)
Set link state.
Sourcepub fn set_hardware_address(&self, address: HardwareAddress)
pub fn set_hardware_address(&self, address: HardwareAddress)
Set the hardware address.
Sourcepub fn get_hardware_address(&self) -> HardwareAddress
pub fn get_hardware_address(&self) -> HardwareAddress
Get the hardware address.
Sourcepub fn multicast_filter(&self) -> MulticastFilter
pub fn multicast_filter(&self) -> MulticastFilter
Get the current multicast filter list.
Sourcepub fn poll_multicast_filter_changed(
&self,
generation: u32,
cx: &mut Context<'_>,
) -> Poll<MulticastFilter>
pub fn poll_multicast_filter_changed( &self, generation: u32, cx: &mut Context<'_>, ) -> Poll<MulticastFilter>
Poll for a change of the multicast filter list.
Returns the new list once its generation differs from generation.
While it does not, registers cx’s waker to be woken at the next change.
Start with generation 0 and pass the returned snapshot’s
generation on later calls.
Sourcepub async fn multicast_filter_changed(&self, generation: u32) -> MulticastFilter
pub async fn multicast_filter_changed(&self, generation: u32) -> MulticastFilter
Wait for a change of the multicast filter list, returning the new list.
Sourcepub fn mark_multicast_filter_changed(&self)
pub fn mark_multicast_filter_changed(&self)
Mark the multicast filter list changed without changing it.
The poll/wait methods report a change, with the same list. Use this to re-apply the filter after the device lost it, for example on a reset.
Trait Implementations§
Source§impl<'d> Clone for StateRunner<'d>
impl<'d> Clone for StateRunner<'d>
Source§fn clone(&self) -> StateRunner<'d>
fn clone(&self) -> StateRunner<'d>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl<'d> Copy for StateRunner<'d>
Auto Trait Implementations§
impl<'d> !RefUnwindSafe for StateRunner<'d>
impl<'d> !Send for StateRunner<'d>
impl<'d> !Sync for StateRunner<'d>
impl<'d> !UnwindSafe for StateRunner<'d>
impl<'d> Freeze for StateRunner<'d>
impl<'d> Unpin for StateRunner<'d>
impl<'d> UnsafeUnpin for StateRunner<'d>
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