pub struct OutboundInterface(/* private fields */);
Expand description
Socket option for local interface to use for outgoing multicast packets.
Implements the IPPROTO_IP/IP_MULTICAST_IF socket option.
§Examples
Setting the option:
use asyncio::*;
use asyncio::ip::*;
let ctx = &IoContext::new().unwrap();
let soc = UdpSocket::new(ctx, Udp::v4()).unwrap();
soc.set_option(OutboundInterface::new(IpAddr::V4(IpAddrV4::new(1,2,3,4))));
Implementations§
Source§impl OutboundInterface
impl OutboundInterface
pub fn new(interface: IpAddr) -> OutboundInterface
pub fn from_v4(interface: IpAddrV4) -> OutboundInterface
pub fn from_v6(interface: IpAddrV6) -> OutboundInterface
Trait Implementations§
Source§impl Clone for OutboundInterface
impl Clone for OutboundInterface
Source§fn clone(&self) -> OutboundInterface
fn clone(&self) -> OutboundInterface
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<P: IpProtocol> SetSocketOption<P> for OutboundInterface
impl<P: IpProtocol> SetSocketOption<P> for OutboundInterface
Auto Trait Implementations§
impl Freeze for OutboundInterface
impl RefUnwindSafe for OutboundInterface
impl Send for OutboundInterface
impl Sync for OutboundInterface
impl Unpin for OutboundInterface
impl UnwindSafe for OutboundInterface
Blanket Implementations§
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
Mutably borrows from an owned value. Read more