pub struct NetworkOptions {
pub discovery: bool,
pub port: Option<u16>,
pub accept: bool,
}Expand description
How an endpoint starts.
Fields§
§discovery: boolWhether it announces itself on the home network by mDNS and finds the others there; without, as in tests, it connects only to addresses it is given.
port: Option<u16>The UDP port it takes connections on, or the next free one of PORTS from it, or
any free one if they are all taken; None for any free port.
accept: boolWhether it takes connections; one that only connects refuses them at once, so that a peer that connects to it learns so, rather than waiting for an answer.
Implementations§
Trait Implementations§
impl Copy for Options
impl Eq for Options
impl StructuralPartialEq for Options
Auto Trait Implementations§
impl Forget for Options
impl Freeze for Options
impl Move for Options
impl RefUnwindSafe for Options
impl Send for Options
impl Sync for Options
impl Unpin for Options
impl UnsafeUnpin for Options
impl UnwindSafe for Options
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.