pub fn fail_command(
        fail_commands: &[&str],
        mode: FailPointMode,
        options: impl Into<Option<FailCommandOptions>>,
    ) -> FailPoint {
        let options = options.into();
        let mut data = doc! {
            "failCommands": fail_commands.iter().map(|s| s.to_string()).collect::<Vec<String>>(),
        };
        append_options(&mut data, options.as_ref()).unwrap();

        let command = doc! {
            "configureFailPoint": "failCommand",
            "mode": bson::to_bson(&mode).unwrap(),
            "data": data,
        };
        FailPoint { command }
    }
/// Create a failCommand failpoint.
/// See <https://github.com/mongodb/mongo/wiki/The-%22failCommand%22-fail-point> for more info.
Create a failCommand failpoint.
See  for more info.
Create a failCommand failpoint . See for more info .
pub fn fail_command(
        fail_commands: &[&str],
        mode: FailPointMode,
        options: impl Into<Option<FailCommandOptions>>,
    ) -> FailPoint {
        let options = options.into();
        let mut data = doc! {
            "failCommands": fail_commands.iter().map(|s| s.to_string()).collect::<Vec<String>>(),
        };
        append_options(&mut data, options.as_ref()).unwrap();
        let command = doc! {
            "configureFailPoint": "failCommand",
            "mode": bson::to_bson(&mode).unwrap(),
            "data": data,
        };
        FailPoint { command }
    }
pub fn fail_command ( fail_commands : & [ & str ] , mode : FailPointMode , options : impl Into < Option < FailCommandOptions > > , ) -> FailPoint { let options = options . into ( ) ; let mut data = doc ! { " " fail_commands iter ( ) map ( s s to_string ( ) ) collect Vec String ( ) } ; append_options ( & mut data , options . as_ref ( ) ) . unwrap ( ) ; let command = doc ! { " " " " " " bson to_bson ( mode ) unwrap ( ) " " data } ; FailPoint { command } }
Create a failCommand failpoint.
Create a failCommand failpoint .
fail_commands
&[&str]
mode
FailPointMode
options
impl Into<Option<FailCommandOptions>>
fail_commands
&[&str]
mode
FailPointMode
options
impl Into<Option<FailCommandOptions>>