Trait netstack3_ip::device::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 IpDeviceIpExt>::AssignedWitness>
       where A::Version: IpDeviceIpExt;
}
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 IpDeviceIpExt>::AssignedWitness>

Returns the address subnet this ID represents.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<BT: IpDeviceStateBindingsTypes> IpAddressId<Ipv4Addr> for StrongRc<Ipv4AddressEntry<BT>>

source§

impl<BT: IpDeviceStateBindingsTypes> IpAddressId<Ipv6Addr> for StrongRc<Ipv6AddressEntry<BT>>

Implementors§