Struct igd_next::SearchOptions

source ·
pub struct SearchOptions {
    pub bind_addr: SocketAddr,
    pub broadcast_address: SocketAddr,
    pub timeout: Option<Duration>,
}
Expand description

Gateway search configuration

SearchOptions::default() should suffice for most situations.

Example

To customize only a few options you can use Default::default() or SearchOptions::default() and the struct update syntax.

let opts = SearchOptions {
    timeout: Some(Duration::from_secs(60)),
    ..Default::default()
};

Fields§

§bind_addr: SocketAddr

Bind address for UDP socket (defaults to all 0.0.0.0)

§broadcast_address: SocketAddr

Broadcast address for discovery packets (defaults to 239.255.255.250:1900)

§timeout: Option<Duration>

Timeout for a search iteration (defaults to 10s)

Trait Implementations§

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more