pub struct Pinger { /* private fields */ }
Expand description
A Ping struct represents the state of one particular ping instance.
Implementations§
Source§impl Pinger
impl Pinger
Sourcepub fn bind_device(
&mut self,
interface: Option<&[u8]>,
) -> Result<&mut Pinger, Error>
pub fn bind_device( &mut self, interface: Option<&[u8]>, ) -> Result<&mut Pinger, Error>
Sets the value for the SO_BINDTODEVICE
option on this socket.
If a socket is bound to an interface, only packets received from that
particular interface are processed by the socket. Note that this only
works for some socket types, particularly AF_INET
sockets.
If interface
is None
or an empty string it removes the binding.
This function is only available on Fuchsia and Linux.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Pinger
impl !RefUnwindSafe for Pinger
impl Send for Pinger
impl Sync for Pinger
impl Unpin for Pinger
impl !UnwindSafe for Pinger
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