pub struct DiscoveredServer {
pub hostname: String,
pub addresses: Vec<SocketAddr>,
pub ssl_port: u16,
pub tcp_port: u16,
pub reachable: bool,
pub latency_ms: Option<u64>,
}Expand description
Discovered server information.
Fields§
§hostname: StringServer hostname
addresses: Vec<SocketAddr>Resolved IP addresses
ssl_port: u16SSL port (typically 50002)
tcp_port: u16TCP port (typically 50001)
reachable: boolWhether the server is reachable
latency_ms: Option<u64>Response time in milliseconds (if tested)
Implementations§
Source§impl DiscoveredServer
impl DiscoveredServer
Sourcepub fn with_ports(self, ssl: u16, tcp: u16) -> Self
pub fn with_ports(self, ssl: u16, tcp: u16) -> Self
Set custom ports.
Sourcepub fn ssl_address(&self) -> String
pub fn ssl_address(&self) -> String
Get SSL address string.
Sourcepub fn tcp_address(&self) -> String
pub fn tcp_address(&self) -> String
Get TCP address string.
Sourcepub fn to_ssl_config(&self) -> ClientConfig
pub fn to_ssl_config(&self) -> ClientConfig
Convert to ClientConfig for SSL connection.
Sourcepub fn to_tcp_config(&self) -> ClientConfig
pub fn to_tcp_config(&self) -> ClientConfig
Convert to ClientConfig for TCP connection.
Trait Implementations§
Source§impl Clone for DiscoveredServer
impl Clone for DiscoveredServer
Source§fn clone(&self) -> DiscoveredServer
fn clone(&self) -> DiscoveredServer
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for DiscoveredServer
impl RefUnwindSafe for DiscoveredServer
impl Send for DiscoveredServer
impl Sync for DiscoveredServer
impl Unpin 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