Trait netstack3_device::DeviceStateSpec

source ·
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 Types§

The link state.

source

type External<BT: DeviceLayerTypes>: Send + Sync

The external (bindings) state.

source

type CreationProperties: Debug

Properties given to device creation.

source

type Counters: Inspectable

Device-specific counters.

source

type TimerId<D: WeakDeviceIdentifier>

The timer identifier required by this device state.

Required Associated Constants§

source

const IS_LOOPBACK: bool

Marker for loopback devices.

source

const DEBUG_TYPE: &'static str

Marker used to print debug information for device identifiers.

Required Methods§

Creates a new link state from the given properties.

Object Safety§

This trait is not object safe.

Implementors§