pub struct MulticastInterfaceSelector { /* private fields */ }Expand description
Applies a Transmit::source to a real multicast socket bound to the unspecified address:
before a datagram to a multicast group, it sets the interface the datagram leaves by
(IP_MULTICAST_IF to the source address, IPV6_MULTICAST_IF to the index of the interface
that holds it) when it differs from the last one set. The system then sends from that
interface’s address: on Linux exactly the address given (IP_MULTICAST_IF with an address
sets the source), on macOS and Windows the interface’s address, the same one where the
interface has one address of the family. For built-in and third-party runtimes whose sockets
have a file descriptor.
Implementations§
Source§impl MulticastInterfaceSelector
impl MulticastInterfaceSelector
Sourcepub fn apply(&self, socket: SockRef<'_>, transmit: &Transmit<'_>) -> Result<()>
pub fn apply(&self, socket: SockRef<'_>, transmit: &Transmit<'_>) -> Result<()>
Sets the interface of transmit on socket. A transmit to a unicast destination, or
without a source of the destination’s family, changes nothing.
§Errors
The source is on no interface of the host, or the system refused the option: the datagram is not to be sent from another interface instead.
Trait Implementations§
Source§impl Debug for MulticastInterfaceSelector
impl Debug for MulticastInterfaceSelector
Auto Trait Implementations§
impl !Freeze for MulticastInterfaceSelector
impl Forget for MulticastInterfaceSelector
impl Move for MulticastInterfaceSelector
impl RefUnwindSafe for MulticastInterfaceSelector
impl Send for MulticastInterfaceSelector
impl Sync for MulticastInterfaceSelector
impl Unpin for MulticastInterfaceSelector
impl UnsafeUnpin for MulticastInterfaceSelector
impl UnwindSafe for MulticastInterfaceSelector
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Source§impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
Source§unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
Source§fn resolve_niched(out: Place<NichedOption<T, N1>>)
fn resolve_niched(out: Place<NichedOption<T, N1>>)
out indicating that a T is niched.