Trait TestIpExt

Source
pub trait TestIpExt:
    Ip
    + IpExt
    + AssignedAddrIpExt {
    const TEST_ADDRS: TestAddrs<Self::Addr>;

    // Required methods
    fn get_other_ip_address(last: u8) -> SpecifiedAddr<Self::Addr>;
    fn get_other_remote_ip_address(last: u8) -> SpecifiedAddr<Self::Addr>;
    fn get_multicast_addr(last: u8) -> MulticastAddr<Self::Addr>;
}
Expand description

An extension trait for Ip providing test-related functionality.

Required Associated Constants§

Source

const TEST_ADDRS: TestAddrs<Self::Addr>

An instance of TestAddrs providing addresses for use in tests.

Required Methods§

Source

fn get_other_ip_address(last: u8) -> SpecifiedAddr<Self::Addr>

Get an IP address in the same subnet as Self::TEST_ADDRS.

last is the value to be put in the last octet of the IP address.

Source

fn get_other_remote_ip_address(last: u8) -> SpecifiedAddr<Self::Addr>

Get an IP address in a different subnet from Self::TEST_ADDRS.

last is the value to be put in the last octet of the IP address.

Source

fn get_multicast_addr(last: u8) -> MulticastAddr<Self::Addr>

Get a multicast IP address.

last is the value to be put in the last octet of the IP address.

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.

Implementations on Foreign Types§

Source§

impl TestIpExt for Ipv4

Source§

impl TestIpExt for Ipv6

Implementors§