client
Module[Client]: one MongoDB deployment, reached through the official driver.
Contents
1 submodule, and what the module defines itself.
use utopia_mongo::Client;pub struct ClientA MongoDB client. See the crate docs.
Debug.use utopia_mongo::Config;pub struct ConfigHow to reach the server and authenticate.
use utopia_mongo::ConnectionInfo;pub struct ConnectionInfoUndocumented.
use utopia_mongo::Options;pub struct OptionsUndocumented.
use utopia_mongo::ReadConcern;pub struct ReadConcernA read concern a command carries (readConcern).
use utopia_mongo::Session;pub struct SessionA logical session: transactions run on one. A cheap handle; the client keeps its state.
use utopia_mongo::SessionState;pub struct SessionStateA session's bookkeeping.
use utopia_mongo::Upsert;pub struct UpsertOne upsert of Client::upsert.
use utopia_mongo::WriteConcern;pub struct WriteConcernA write concern a command carries (writeConcern).
use utopia_mongo::Reply;pub enum ReplyWhat a command returned: its n (documents counted, inserted, matched
or deleted) when the reply has one, the whole reply otherwise.
use utopia_mongo::TransactionState;pub enum TransactionStateWhere a session's transaction is.
use utopia_mongo::client::int;pub fn int(value: i64) -> BsonUndocumented.
use utopia_mongo::client::string;pub fn string(bytes: &[u8]) -> BsonUndocumented.
use utopia_mongo::client::unencoded;pub fn unencoded(binary: &Binary) -> Option<&[u8]>Undocumented.
pub const READ_CONCERNS: [&str; 5] = ["local", "available", "majority", "linearizable", "snapshot"]Read concern levels createReadConcern accepts.
pub const STRING: BinarySubtype = BinarySubtype::UserDefined(0xfe)Undocumented.
pub const TRANSACTION_ABORTED_ERROR: i64 = 251NoSuchTransaction.
pub const TRANSACTION_TIMEOUT_ERROR: i64 = 50MaxTimeMSExpired.
pub const TRANSIENT_TRANSACTION_ERROR: &str = "TransientTransactionError"TransientTransactionError: the label of a transaction that may be retried.
pub const UNKNOWN_TRANSACTION_COMMIT_RESULT: &str = "UnknownTransactionCommitResult"UnknownTransactionCommitResult: the label of a commit that may have applied.
client::command
Own pageThe command names of Client::COMMAND_*.
pub const ABORT_TRANSACTION: &str = "abortTransaction"COMMAND_ABORT_TRANSACTION.
pub const AGGREGATE: &str = "aggregate"COMMAND_AGGREGATE.
pub const COLLMOD: &str = "collMod"COMMAND_COLLMOD.
pub const COMMIT_TRANSACTION: &str = "commitTransaction"COMMAND_COMMIT_TRANSACTION.
pub const COUNT: &str = "count"COMMAND_COUNT.
pub const CREATE: &str = "create"COMMAND_CREATE.
pub const DELETE: &str = "delete"COMMAND_DELETE.
pub const DISTINCT: &str = "distinct"COMMAND_DISTINCT.
pub const END_SESSIONS: &str = "endSessions"COMMAND_END_SESSIONS.
pub const FIND: &str = "find"COMMAND_FIND.
pub const FIND_AND_MODIFY: &str = "findAndModify"COMMAND_FIND_AND_MODIFY.
pub const GET_LAST_ERROR: &str = "getLastError"COMMAND_GET_LAST_ERROR.
pub const GET_MORE: &str = "getMore"COMMAND_GET_MORE.
pub const INSERT: &str = "insert"COMMAND_INSERT.
pub const KILL_CURSORS: &str = "killCursors"COMMAND_KILL_CURSORS.
pub const LIST_INDEXES: &str = "listIndexes"COMMAND_LIST_INDEXES.
pub const MAP_REDUCE: &str = "mapReduce"COMMAND_MAP_REDUCE.
pub const RESET_ERROR: &str = "resetError"COMMAND_RESET_ERROR.
pub const START_SESSION: &str = "startSession"COMMAND_START_SESSION.
pub const UPDATE: &str = "update"COMMAND_UPDATE.