pub struct DeviceAnyApi<C>(/* private fields */);
Expand description
The device API interacting with any kind of supported device.
Implementations§
Source§impl<C> DeviceAnyApi<C>
impl<C> DeviceAnyApi<C>
Sourcepub fn new(ctx: C) -> Self
pub fn new(ctx: C) -> Self
Creates a new DeviceAnyApi
from ctx
.
Source§impl<C> DeviceAnyApi<C>where
C: ContextPair,
C::CoreContext: DeviceApiCoreContext<EthernetLinkDevice, C::BindingsContext> + DeviceApiCoreContext<LoopbackDevice, C::BindingsContext> + DeviceApiCoreContext<PureIpDevice, C::BindingsContext>,
C::BindingsContext: DeviceApiBindingsContext,
impl<C> DeviceAnyApi<C>where
C: ContextPair,
C::CoreContext: DeviceApiCoreContext<EthernetLinkDevice, C::BindingsContext> + DeviceApiCoreContext<LoopbackDevice, C::BindingsContext> + DeviceApiCoreContext<PureIpDevice, C::BindingsContext>,
C::BindingsContext: DeviceApiBindingsContext,
Sourcepub fn apply_configuration(
&mut self,
pending: PendingDeviceConfigurationUpdate<'_, DeviceId<C::BindingsContext>>,
) -> DeviceConfigurationUpdate
pub fn apply_configuration( &mut self, pending: PendingDeviceConfigurationUpdate<'_, DeviceId<C::BindingsContext>>, ) -> DeviceConfigurationUpdate
Like DeviceApi::apply_configuration
but for any device types.
Sourcepub fn new_configuration_update<'a>(
&mut self,
device: &'a DeviceId<C::BindingsContext>,
config: DeviceConfigurationUpdate,
) -> Result<PendingDeviceConfigurationUpdate<'a, DeviceId<C::BindingsContext>>, DeviceConfigurationUpdateError>
pub fn new_configuration_update<'a>( &mut self, device: &'a DeviceId<C::BindingsContext>, config: DeviceConfigurationUpdate, ) -> Result<PendingDeviceConfigurationUpdate<'a, DeviceId<C::BindingsContext>>, DeviceConfigurationUpdateError>
Like DeviceApi::new_configuration_update
but for any device
types.
Sourcepub fn get_configuration(
&mut self,
device: &DeviceId<C::BindingsContext>,
) -> DeviceConfiguration
pub fn get_configuration( &mut self, device: &DeviceId<C::BindingsContext>, ) -> DeviceConfiguration
Like DeviceApi::get_configuration
but for any device types.
Sourcepub fn inspect<N: Inspector>(
&mut self,
device: &DeviceId<C::BindingsContext>,
inspector: &mut N,
)
pub fn inspect<N: Inspector>( &mut self, device: &DeviceId<C::BindingsContext>, inspector: &mut N, )
Like DeviceApi::inspect
but for any device type.
Auto Trait Implementations§
impl<C> Freeze for DeviceAnyApi<C>where
C: Freeze,
impl<C> RefUnwindSafe for DeviceAnyApi<C>where
C: RefUnwindSafe,
impl<C> Send for DeviceAnyApi<C>where
C: Send,
impl<C> Sync for DeviceAnyApi<C>where
C: Sync,
impl<C> Unpin for DeviceAnyApi<C>where
C: Unpin,
impl<C> UnwindSafe for DeviceAnyApi<C>where
C: UnwindSafe,
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
Source§impl<CC, BC, Meta> RecvFrameContext<Meta, BC> for CCwhere
Meta: ReceivableFrameMeta<CC, BC>,
impl<CC, BC, Meta> RecvFrameContext<Meta, BC> for CCwhere
Meta: ReceivableFrameMeta<CC, BC>,
Source§impl<CC, BC, Meta> SendFrameContext<BC, Meta> for CCwhere
Meta: SendableFrameMeta<CC, BC>,
impl<CC, BC, Meta> SendFrameContext<BC, Meta> for CCwhere
Meta: SendableFrameMeta<CC, BC>,
Source§fn send_frame<S>(
&mut self,
bindings_ctx: &mut BC,
metadata: Meta,
frame: S,
) -> Result<(), ErrorAndSerializer<SendFrameErrorReason, S>>where
S: Serializer,
<S as Serializer>::Buffer: BufferMut,
fn send_frame<S>(
&mut self,
bindings_ctx: &mut BC,
metadata: Meta,
frame: S,
) -> Result<(), ErrorAndSerializer<SendFrameErrorReason, S>>where
S: Serializer,
<S as Serializer>::Buffer: BufferMut,
Send a frame. Read more
Source§impl<Id, CC, BC> TimerHandler<BC, Id> for CCwhere
BC: TimerBindingsTypes,
Id: HandleableTimer<CC, BC>,
impl<Id, CC, BC> TimerHandler<BC, Id> for CCwhere
BC: TimerBindingsTypes,
Id: HandleableTimer<CC, BC>,
Source§fn handle_timer(
&mut self,
bindings_ctx: &mut BC,
dispatch: Id,
timer: <BC as TimerBindingsTypes>::UniqueTimerId,
)
fn handle_timer( &mut self, bindings_ctx: &mut BC, dispatch: Id, timer: <BC as TimerBindingsTypes>::UniqueTimerId, )
Handle a timer firing. Read more