Struct mongodb::topology::Topology
[−]
[src]
pub struct Topology { pub config: ConnectionString, pub description: Arc<RwLock<TopologyDescription>>, }
Holds status and connection information about a server set.
Fields
config: ConnectionString
The initial connection configuration.
description: Arc<RwLock<TopologyDescription>>
Monitored topology information.
Methods
impl Topology
[src]
fn new(
config: ConnectionString,
description: Option<TopologyDescription>,
connector: StreamConnector
) -> Result<Topology>
config: ConnectionString,
description: Option<TopologyDescription>,
connector: StreamConnector
) -> Result<Topology>
Returns a new topology with the given configuration and description.
fn acquire_stream(
&self,
read_preference: ReadPreference
) -> Result<(PooledStream, bool, bool)>
&self,
read_preference: ReadPreference
) -> Result<(PooledStream, bool, bool)>
Returns a server stream for read operations.
fn acquire_write_stream(&self) -> Result<PooledStream>
Returns a server stream for write operations.
Trait Implementations
impl Clone for Topology
[src]
fn clone(&self) -> Topology
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more