Trait netstack3_ip::socket::DelegatedSendOptions

source ·
pub trait DelegatedSendOptions<I: IpExt>: OptionDelegationMarker {
    // Provided methods
    fn delegate(&self) -> &impl SendOptions<I> { ... }
    fn hop_limit(
        &self,
        destination: &SpecifiedAddr<I::Addr>,
    ) -> Option<NonZeroU8> { ... }
    fn multicast_loop(&self) -> bool { ... }
    fn allow_broadcast(&self) -> Option<I::BroadcastMarker> { ... }
    fn dscp_and_ecn(&self) -> DscpAndEcn { ... }
    fn mtu(&self) -> Mtu { ... }
}
Expand description

A trait providing send options delegation to an inner type.

A blanket impl of SendOptions is provided to all implementers. This trait has the same shape as SendOptions but all the methods provide default implementations that delegate to the value returned by DelegatedSendOptions::Delegate. For brevity, the default delegate is DefaultIpSocketOptions.

Provided Methods§

source

fn delegate(&self) -> &impl SendOptions<I>

Returns the delegate providing the impl for all default methods.

source

fn hop_limit(&self, destination: &SpecifiedAddr<I::Addr>) -> Option<NonZeroU8>

source

fn multicast_loop(&self) -> bool

source

fn allow_broadcast(&self) -> Option<I::BroadcastMarker>

source

fn dscp_and_ecn(&self) -> DscpAndEcn

source

fn mtu(&self) -> Mtu

Object Safety§

This trait is not object safe.

Implementors§