pub struct MulticastLeaveGroup(/* private fields */);
Expand description
Socket option to leave a multicast group on a specified interface.
Implements the IPPROTO_IP/IP_DROP_MEMBERSHIP or IPPROTO_IPV6/IPV6_LEAVE_GROUP 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(MulticastLeaveGroup::new(IpAddr::V4(IpAddrV4::new(225,0,0,1))));
Implementations§
Source§impl MulticastLeaveGroup
impl MulticastLeaveGroup
pub fn new(multicast: IpAddr) -> MulticastLeaveGroup
pub fn from_v4(multicast: IpAddrV4, interface: IpAddrV4) -> MulticastLeaveGroup
pub fn from_v6(multicast: IpAddrV6, scope_id: u32) -> MulticastLeaveGroup
Trait Implementations§
Source§impl Clone for MulticastLeaveGroup
impl Clone for MulticastLeaveGroup
Source§fn clone(&self) -> MulticastLeaveGroup
fn clone(&self) -> MulticastLeaveGroup
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 MulticastLeaveGroup
impl<P: IpProtocol> SetSocketOption<P> for MulticastLeaveGroup
Auto Trait Implementations§
impl Freeze for MulticastLeaveGroup
impl RefUnwindSafe for MulticastLeaveGroup
impl Send for MulticastLeaveGroup
impl Sync for MulticastLeaveGroup
impl Unpin for MulticastLeaveGroup
impl UnwindSafe for MulticastLeaveGroup
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