pub struct DiscoveredServer {
pub addresses: Vec<String>,
pub path: String,
pub name: Option<String>,
}Expand description
One server a browser reported.
Fields§
§addresses: Vec<String>host:port addresses the browser resolved for the service, most suitable first.
path: StringThe path TXT record the service published.
name: Option<String>The name TXT record, when the service published one.
Implementations§
Source§impl DiscoveredServer
impl DiscoveredServer
Sourcepub fn endpoint(&self) -> Option<String>
pub fn endpoint(&self) -> Option<String>
Returns the ws:// endpoint to dial, or None when the record cannot name one.
The scheme is ws:// even though the path is advertised: connection.md requires a
connection to an advertised address to use plain ws://, with confidentiality and integrity
provided by the Noise layer inside the payloads. An address that carries a scheme already,
a missing address and a path that is not path-absolute (RFC 3986) all yield None,
because dialling them would mean guessing what the advertiser meant.
Trait Implementations§
Source§impl Clone for DiscoveredServer
impl Clone for DiscoveredServer
Source§impl Debug for DiscoveredServer
impl Debug for DiscoveredServer
impl Eq for DiscoveredServer
Source§impl PartialEq for DiscoveredServer
impl PartialEq for DiscoveredServer
impl StructuralPartialEq for DiscoveredServer
Auto Trait Implementations§
impl Forget for DiscoveredServer
impl Freeze for DiscoveredServer
impl Move for DiscoveredServer
impl RefUnwindSafe for DiscoveredServer
impl Send for DiscoveredServer
impl Sync for DiscoveredServer
impl Unpin for DiscoveredServer
impl UnsafeUnpin for DiscoveredServer
impl UnwindSafe for DiscoveredServer
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