Function mongocrypt_sys::mongocrypt_ctx_mongo_feed
source ยท pub unsafe extern "C" fn mongocrypt_ctx_mongo_feed(
ctx: *mut mongocrypt_ctx_t,
reply: *mut mongocrypt_binary_t,
) -> bool
Expand description
Feed a BSON reply or result when mongocrypt_ctx_t is in MONGOCRYPT_CTX_NEED_MONGO_* states. This may be called multiple times depending on the operation.
reply is a BSON document result being fed back for this operation.
- For MONGOCRYPT_CTX_NEED_MONGO_COLLINFO(_WITH_DB) it is a doc from a listCollections cursor. (Note, if listCollections returned no result, do not call this function.)
- For MONGOCRYPT_CTX_NEED_MONGO_KEYS it is a doc from a find cursor. (Note, if find returned no results, do not call this function. reply must not be NULL.)
- For MONGOCRYPT_CTX_NEED_MONGO_MARKINGS it is a reply from mongocryptd.
@param[in] ctx The @ref mongocrypt_ctx_t object. @param[in] reply A BSON document for the MongoDB operation. The viewed data is copied. It is valid to destroy @p reply with @ref mongocrypt_binary_destroy immediately after. @returns A boolean indicating success. If false, an error status is set. Retrieve it with @ref mongocrypt_ctx_status