#[non_exhaustive]pub struct CommandFailedEvent {
pub duration: Duration,
pub command_name: String,
pub failure: Error,
pub request_id: i32,
pub connection: ConnectionInfo,
pub service_id: Option<ObjectId>,
}Expand description
An event that triggers when a command failed to complete successfully.
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.duration: DurationThe total execution time of the command (including the network round-trip).
command_name: StringThe type of command that was run, e.g. “find” or “hello”.
failure: ErrorThe error that the driver returned due to the event failing.
request_id: i32The driver-generated identifier for the request. Applications can use this to identify the
corresponding CommandStartedEvent that triggered
earlier.
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 CommandFailedEvent
impl Clone for CommandFailedEvent
sourcefn clone(&self) -> CommandFailedEvent
fn clone(&self) -> CommandFailedEvent
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 more
sourceimpl Debug for CommandFailedEvent
impl Debug for CommandFailedEvent
sourceimpl Serialize for CommandFailedEvent
impl Serialize for CommandFailedEvent
Auto Trait Implementations
impl !RefUnwindSafe for CommandFailedEvent
impl Send for CommandFailedEvent
impl Sync for CommandFailedEvent
impl Unpin for CommandFailedEvent
impl !UnwindSafe for CommandFailedEvent
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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