netstack3_base

Trait IpAddressId

Source
pub trait IpAddressId<A: IpAddress>:
    Clone
    + Eq
    + Debug
    + Hash {
    type Weak: WeakIpAddressId<A>;

    // Required methods
    fn downgrade(&self) -> Self::Weak;
    fn addr(&self) -> IpDeviceAddr<A>;
    fn addr_sub(
        &self,
    ) -> AddrSubnet<A, <A::Version as AssignedAddrIpExt>::AssignedWitness>
       where A::Version: AssignedAddrIpExt;
}
Expand description

An IP address ID.

Required Associated Types§

Source

type Weak: WeakIpAddressId<A>

The weak version of this ID.

Required Methods§

Source

fn downgrade(&self) -> Self::Weak

Downgrades this ID to a weak reference.

Source

fn addr(&self) -> IpDeviceAddr<A>

Returns the address this ID represents.

Source

fn addr_sub( &self, ) -> AddrSubnet<A, <A::Version as AssignedAddrIpExt>::AssignedWitness>

Returns the address subnet this ID represents.

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§