pub enum Discovery {
Mdns,
Manual,
}Expand description
How a client should look for the server – read from a settings store by the caller, plain string in, plain enum out.
Variants§
Mdns
Listen for the server announcing itself over mDNS (discover).
The normal case: a boat network hands out addresses that change,
and a mariner should not have to know one.
Manual
Use an address stated by hand (resolve_stated_server). For a
server that does not announce itself – one behind a router, or
with mDNS switched off.
Implementations§
Source§impl Discovery
impl Discovery
Sourcepub fn from_key(value: &str) -> Self
pub fn from_key(value: &str) -> Self
The variant a stored wire string names – "mdns" for anything it
does not recognise, listening being the fail-safe default: it asks
nothing of a mariner who never typed an address at all.
Sourcepub fn as_str(self) -> &'static str
pub fn as_str(self) -> &'static str
The wire string a settings store should keep, the inverse of
Discovery::from_key.
Sourcepub fn from_position(position: u32) -> Self
pub fn from_position(position: u32) -> Self
Back from a position in that list.
Trait Implementations§
impl Copy for Discovery
impl Eq for Discovery
impl StructuralPartialEq for Discovery
Auto Trait Implementations§
impl Freeze for Discovery
impl RefUnwindSafe for Discovery
impl Send for Discovery
impl Sync for Discovery
impl Unpin for Discovery
impl UnsafeUnpin for Discovery
impl UnwindSafe for Discovery
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