Struct surge_ping::ConfigBuilder
source · pub struct ConfigBuilder { /* private fields */ }Implementations
sourceimpl ConfigBuilder
impl ConfigBuilder
sourcepub fn bind(self, bind: SocketAddr) -> Self
pub fn bind(self, bind: SocketAddr) -> Self
Binds this socket to the specified address.
This function directly corresponds to the bind(2) function on Windows
and Unix.
sourcepub fn interface(self, interface: &str) -> Self
pub fn interface(self, interface: &str) -> Self
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.
sourcepub fn ttl(self, ttl: u32) -> Self
pub fn ttl(self, ttl: u32) -> Self
Set the value of the IP_TTL option for this socket.
This value sets the time-to-live field that is used in every packet sent from this socket.
pub fn fib(self, fib: u32) -> Self
sourcepub fn kind(self, kind: ICMP) -> Self
pub fn kind(self, kind: ICMP) -> Self
Identify which ICMP the socket handles.(default: ICMP::V4)
pub fn build(self) -> Config
Trait Implementations
sourceimpl Debug for ConfigBuilder
impl Debug for ConfigBuilder
sourceimpl Default for ConfigBuilder
impl Default for ConfigBuilder
sourcefn default() -> ConfigBuilder
fn default() -> ConfigBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations
impl RefUnwindSafe for ConfigBuilder
impl Send for ConfigBuilder
impl Sync for ConfigBuilder
impl Unpin for ConfigBuilder
impl UnwindSafe for ConfigBuilder
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more