pub trait DeviceStateSpec:
Device
+ Sized
+ Send
+ Sync
+ 'static {
type Link<BT: DeviceLayerTypes>: Send + Sync;
type External<BT: DeviceLayerTypes>: Send + Sync;
type CreationProperties: Debug;
type Counters: Inspectable;
type TimerId<D: WeakDeviceIdentifier>;
const IS_LOOPBACK: bool;
const DEBUG_TYPE: &'static str;
// Required method
fn new_link_state<CC: CoreTimerContext<Self::TimerId<CC::WeakDeviceId>, BC> + DeviceIdContext<Self>, BC: DeviceLayerTypes + TimerContext>(
bindings_ctx: &mut BC,
self_id: CC::WeakDeviceId,
properties: Self::CreationProperties,
) -> Self::Link<BC>;
}
Expand description
Provides the specifications for device state held by [BaseDeviceId
] in
[BaseDeviceState
].
Required Associated Constants§
Sourceconst IS_LOOPBACK: bool
const IS_LOOPBACK: bool
Marker for loopback devices.
Sourceconst DEBUG_TYPE: &'static str
const DEBUG_TYPE: &'static str
Marker used to print debug information for device identifiers.
Required Associated Types§
Sourcetype Link<BT: DeviceLayerTypes>: Send + Sync
type Link<BT: DeviceLayerTypes>: Send + Sync
The link state.
Sourcetype External<BT: DeviceLayerTypes>: Send + Sync
type External<BT: DeviceLayerTypes>: Send + Sync
The external (bindings) state.
Sourcetype CreationProperties: Debug
type CreationProperties: Debug
Properties given to device creation.
Sourcetype Counters: Inspectable
type Counters: Inspectable
Device-specific counters.
Sourcetype TimerId<D: WeakDeviceIdentifier>
type TimerId<D: WeakDeviceIdentifier>
The timer identifier required by this device state.
Required Methods§
Sourcefn new_link_state<CC: CoreTimerContext<Self::TimerId<CC::WeakDeviceId>, BC> + DeviceIdContext<Self>, BC: DeviceLayerTypes + TimerContext>(
bindings_ctx: &mut BC,
self_id: CC::WeakDeviceId,
properties: Self::CreationProperties,
) -> Self::Link<BC>
fn new_link_state<CC: CoreTimerContext<Self::TimerId<CC::WeakDeviceId>, BC> + DeviceIdContext<Self>, BC: DeviceLayerTypes + TimerContext>( bindings_ctx: &mut BC, self_id: CC::WeakDeviceId, properties: Self::CreationProperties, ) -> Self::Link<BC>
Creates a new link state from the given properties.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.