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§
Auto Trait Implementations§
impl RefUnwindSafe for SearchOptions
impl Send for SearchOptions
impl Sync for SearchOptions
impl Unpin for SearchOptions
impl UnwindSafe for SearchOptions
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