Type Alias mongocrypt_sys::mongocrypt_random_fn

source ·
pub type mongocrypt_random_fn = Option<unsafe extern "C" fn(ctx: *mut c_void, out: *mut mongocrypt_binary_t, count: u32, status: *mut mongocrypt_status_t) -> bool>;
Expand description

A crypto secure random function.

@param[in] ctx An optional context object that may have been set when hooks were enabled. @param[out] out A preallocated byte array for the output. See @ref mongocrypt_binary_data. @param[in] count The number of random bytes requested. @param[out] status An optional status to pass error messages. See @ref mongocrypt_status_set. @returns A boolean indicating success. If returning false, set @p status with a message indiciating the error using @ref mongocrypt_status_set.

Aliased Type§

enum mongocrypt_random_fn {
    None,
    Some(unsafe extern "C" fn(_: *mut c_void, _: *mut _mongocrypt_binary_t, _: u32, _: *mut _mongocrypt_status_t) -> bool),
}

Variants§

§1.0.0

None

No value.

§1.0.0

Some(unsafe extern "C" fn(_: *mut c_void, _: *mut _mongocrypt_binary_t, _: u32, _: *mut _mongocrypt_status_t) -> bool)

Some value of type T.