Trait netstack3_ip::device::IpDeviceIpExt
source · pub trait IpDeviceIpExt: IpDeviceStateIpExt {
type State<BT: IpDeviceStateBindingsTypes>: AsRef<IpDeviceState<Self, BT>> + AsMut<IpDeviceState<Self, BT>>;
type Configuration: AsRef<IpDeviceConfiguration> + Clone;
type Timer<D: WeakDeviceIdentifier, A: IpAddressIdSpec>: Into<IpDeviceTimerId<Self, D, A>> + From<IpDeviceTimerId<Self, D, A>> + Clone + Eq + PartialEq + Debug + Hash;
type AssignedWitness: Witness<Self::Addr> + Copy + Eq + PartialEq + Debug + Display + Hash + Into<SpecifiedAddr<Self::Addr>>;
type AddressConfig<I: Instant>: Default + Debug;
type ManualAddressConfig<I: Instant>: Default + Debug + Into<Self::AddressConfig<I>>;
type AddressState<I: Instant>: 'static + Inspectable;
type ConfigurationUpdate: From<IpDeviceConfigurationUpdate> + AsRef<IpDeviceConfigurationUpdate> + Debug;
type ConfigurationAndFlags: From<(Self::Configuration, IpDeviceFlags)> + AsRef<IpDeviceConfiguration> + AsRef<IpDeviceFlags> + AsMut<IpDeviceConfiguration> + PartialEq + Debug;
// Required methods
fn get_valid_until<I: Instant>(
config: &Self::AddressConfig<I>,
) -> Lifetime<I>;
fn is_addr_assigned<I: Instant>(addr_state: &Self::AddressState<I>) -> bool;
fn timer_device_id<D: WeakDeviceIdentifier, A: IpAddressIdSpec>(
timer: &Self::Timer<D, A>,
) -> Option<D::Strong>;
fn take_addr_config_for_removal<I: Instant>(
addr_state: &mut Self::AddressState<I>,
) -> Option<Self::AddressConfig<I>>;
}
Expand description
An extension trait adding IP device properties.
Required Associated Types§
sourcetype State<BT: IpDeviceStateBindingsTypes>: AsRef<IpDeviceState<Self, BT>> + AsMut<IpDeviceState<Self, BT>>
type State<BT: IpDeviceStateBindingsTypes>: AsRef<IpDeviceState<Self, BT>> + AsMut<IpDeviceState<Self, BT>>
IP layer state kept by the device.
sourcetype Configuration: AsRef<IpDeviceConfiguration> + Clone
type Configuration: AsRef<IpDeviceConfiguration> + Clone
IP layer configuration kept by the device.
sourcetype Timer<D: WeakDeviceIdentifier, A: IpAddressIdSpec>: Into<IpDeviceTimerId<Self, D, A>> + From<IpDeviceTimerId<Self, D, A>> + Clone + Eq + PartialEq + Debug + Hash
type Timer<D: WeakDeviceIdentifier, A: IpAddressIdSpec>: Into<IpDeviceTimerId<Self, D, A>> + From<IpDeviceTimerId<Self, D, A>> + Clone + Eq + PartialEq + Debug + Hash
High level IP device timer.
sourcetype AssignedWitness: Witness<Self::Addr> + Copy + Eq + PartialEq + Debug + Display + Hash + Into<SpecifiedAddr<Self::Addr>>
type AssignedWitness: Witness<Self::Addr> + Copy + Eq + PartialEq + Debug + Display + Hash + Into<SpecifiedAddr<Self::Addr>>
The witness type for assigned addresses.
sourcetype AddressConfig<I: Instant>: Default + Debug
type AddressConfig<I: Instant>: Default + Debug
Device address configuration.
sourcetype ManualAddressConfig<I: Instant>: Default + Debug + Into<Self::AddressConfig<I>>
type ManualAddressConfig<I: Instant>: Default + Debug + Into<Self::AddressConfig<I>>
Manual device address configuration (user-initiated).
sourcetype AddressState<I: Instant>: 'static + Inspectable
type AddressState<I: Instant>: 'static + Inspectable
Device address associated state.
sourcetype ConfigurationUpdate: From<IpDeviceConfigurationUpdate> + AsRef<IpDeviceConfigurationUpdate> + Debug
type ConfigurationUpdate: From<IpDeviceConfigurationUpdate> + AsRef<IpDeviceConfigurationUpdate> + Debug
Device configuration update request.
sourcetype ConfigurationAndFlags: From<(Self::Configuration, IpDeviceFlags)> + AsRef<IpDeviceConfiguration> + AsRef<IpDeviceFlags> + AsMut<IpDeviceConfiguration> + PartialEq + Debug
type ConfigurationAndFlags: From<(Self::Configuration, IpDeviceFlags)> + AsRef<IpDeviceConfiguration> + AsRef<IpDeviceFlags> + AsMut<IpDeviceConfiguration> + PartialEq + Debug
IP layer configuration and flags.
Required Methods§
sourcefn get_valid_until<I: Instant>(config: &Self::AddressConfig<I>) -> Lifetime<I>
fn get_valid_until<I: Instant>(config: &Self::AddressConfig<I>) -> Lifetime<I>
Gets the lifetime of an address from its configuration.
sourcefn is_addr_assigned<I: Instant>(addr_state: &Self::AddressState<I>) -> bool
fn is_addr_assigned<I: Instant>(addr_state: &Self::AddressState<I>) -> bool
Returns whether the address is currently assigned based on state.
sourcefn timer_device_id<D: WeakDeviceIdentifier, A: IpAddressIdSpec>(
timer: &Self::Timer<D, A>,
) -> Option<D::Strong>
fn timer_device_id<D: WeakDeviceIdentifier, A: IpAddressIdSpec>( timer: &Self::Timer<D, A>, ) -> Option<D::Strong>
Extracts the device ID from a device timer.
sourcefn take_addr_config_for_removal<I: Instant>(
addr_state: &mut Self::AddressState<I>,
) -> Option<Self::AddressConfig<I>>
fn take_addr_config_for_removal<I: Instant>( addr_state: &mut Self::AddressState<I>, ) -> Option<Self::AddressConfig<I>>
Extracts the address configuration from the state in preparation for removal.
Object Safety§
This trait is not object safe.