Struct mongodb::topology::server::Server [−][src]
pub struct Server { pub host: Host, pub description: Arc<RwLock<ServerDescription>>, // some fields omitted }
Holds status and connection information about a single server.
Fields
host: Host
Host connection details.
description: Arc<RwLock<ServerDescription>>
Monitored server information.
Methods
impl Server
[src]
impl Server
pub fn new(
client: Client,
host: Host,
top_description: Arc<RwLock<TopologyDescription>>,
run_monitor: bool,
connector: StreamConnector
) -> Server
[src]
pub fn new(
client: Client,
host: Host,
top_description: Arc<RwLock<TopologyDescription>>,
run_monitor: bool,
connector: StreamConnector
) -> Server
Returns a new server with the given host, initializing a new connection pool and monitor.
pub fn acquire_stream(&self, client: Client) -> Result<PooledStream>
[src]
pub fn acquire_stream(&self, client: Client) -> Result<PooledStream>
Returns a server stream from the connection pool.
pub fn request_update(&self)
[src]
pub fn request_update(&self)
Request an update from the monitor on the server status.
Trait Implementations
impl Clone for Server
[src]
impl Clone for Server
fn clone(&self) -> Server
[src]
fn clone(&self) -> Server
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0
[src]Performs copy-assignment from source
. Read more
impl Drop for Server
[src]
impl Drop for Server