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 T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more