netstack3_base

Trait WeakIpAddressId

Source
pub trait WeakIpAddressId<A: IpAddress>:
    Clone
    + Eq
    + Debug
    + Hash
    + Send
    + Sync
    + 'static {
    type Strong: IpAddressId<A>;

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

A weak IP address ID.

Required Associated Types§

Source

type Strong: IpAddressId<A>

The strong version of this ID.

Required Methods§

Source

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

Attempts to upgrade this ID to the strong version.

Upgrading fails if this is no longer a valid assigned IP address.

Source

fn is_assigned(&self) -> bool

Returns whether this address is still assigned.

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§