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§
Sourcefn delegate(&self) -> &impl SendOptions<I>
fn delegate(&self) -> &impl SendOptions<I>
Returns the delegate providing the impl for all default methods.
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
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.