Struct mongors::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]
impl Topology
pub fn new(
config: ConnectionString,
description: Option<TopologyDescription>,
connector: StreamConnector
) -> Result<Topology>
[src]
pub fn new(
config: ConnectionString,
description: Option<TopologyDescription>,
connector: StreamConnector
) -> Result<Topology>
Returns a new topology with the given configuration and description.
pub fn acquire_stream(
&self,
read_preference: ReadPreference
) -> Result<(PooledStream, bool, bool)>
[src]
pub fn acquire_stream(
&self,
read_preference: ReadPreference
) -> Result<(PooledStream, bool, bool)>
Returns a server stream for read operations.
pub fn acquire_write_stream(&self) -> Result<PooledStream>
[src]
pub fn acquire_write_stream(&self) -> Result<PooledStream>
Returns a server stream for write operations.