#[non_exhaustive]pub struct CommandStartedEvent {
pub command: Document,
pub db: String,
pub command_name: String,
pub request_id: i32,
pub connection: ConnectionInfo,
pub service_id: Option<ObjectId>,
}Expand description
An event that triggers when a database command is initiated.
Fields (Non-exhaustive)
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.command: DocumentThe command being run.
db: StringThe name of the database the command is being run against.
command_name: StringThe type of command being run, e.g. “find” or “hello”.
request_id: i32The driver-generated identifier for the request. Applications can use this to identify the
corresponding event triggered by the completion of this command (i.e. either
CommandSucceededEvent or
CommandFailedEvent).
connection: ConnectionInfoInformation about the connect the command will be run on.
service_id: Option<ObjectId>If the client connection is to a load balancer, the id of the selected backend.
Trait Implementations
sourceimpl Clone for CommandStartedEvent
impl Clone for CommandStartedEvent
sourcefn clone(&self) -> CommandStartedEvent
fn clone(&self) -> CommandStartedEvent
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresourceimpl Debug for CommandStartedEvent
impl Debug for CommandStartedEvent
sourceimpl Serialize for CommandStartedEvent
impl Serialize for CommandStartedEvent
Auto Trait Implementations
impl RefUnwindSafe for CommandStartedEvent
impl Send for CommandStartedEvent
impl Sync for CommandStartedEvent
impl Unpin for CommandStartedEvent
impl UnwindSafe for CommandStartedEvent
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more