netstack3_base

Trait WeakDeviceIdentifier

Source
pub trait WeakDeviceIdentifier: DeviceIdentifier + PartialEq<Self::Strong> {
    type Strong: StrongDeviceIdentifier<Weak = Self>;

    // Required method
    fn upgrade(&self) -> Option<Self::Strong>;
}
Expand description

A weak device reference.

This is the weak reference equivalent of StrongDeviceIdentifier.

Required Associated Types§

Source

type Strong: StrongDeviceIdentifier<Weak = Self>

The strong version of this identifier.

Required Methods§

Source

fn upgrade(&self) -> Option<Self::Strong>

Attempts to upgrade this weak ID to a strong ID.

Returns None if the resource has been destroyed.

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.

Implementors§