Struct swarm_discovery::DropGuard
source · pub struct DropGuard { /* private fields */ }
Expand description
A guard which will keep the discovery running until it is dropped.
You can also use this guard to modify the local addresses while the discovery is running.
Implementations§
source§impl DropGuard
impl DropGuard
sourcepub fn remove_all(&self)
pub fn remove_all(&self)
Remove all local addresses and stop advertising.
sourcepub fn remove_port(&self, port: u16)
pub fn remove_port(&self, port: u16)
Remove a specific port from the local addresses.
sourcepub fn remove_addr(&self, addr: IpAddr)
pub fn remove_addr(&self, addr: IpAddr)
Remove a specific address from the local addresses.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DropGuard
impl !RefUnwindSafe for DropGuard
impl Send for DropGuard
impl Sync for DropGuard
impl Unpin for DropGuard
impl !UnwindSafe for DropGuard
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