[][src]Type Definition melib::backends::notmuch::bindings::notmuch_database_find_message

type notmuch_database_find_message = unsafe extern "C" fn(database: *mut notmuch_database_t, message_id: *const c_char, message: *mut *mut notmuch_message_t) -> notmuch_status_t;

Find a message with the given message_id.

If a message with the given message_id is found then, on successful return (NOTMUCH_STATUS_SUCCESS) '*message' will be initialized to a message object. The caller should call notmuch_message_destroy when done with the message.

On any failure or when the message is not found, this function initializes '*message' to NULL. This means, when NOTMUCH_STATUS_SUCCESS is returned, the caller is supposed to check '*message' for NULL to find out whether the message with the given message_id was found.

Return value:

NOTMUCH_STATUS_SUCCESS: Successful return, check '*message'.

NOTMUCH_STATUS_NULL_POINTER: The given 'message' argument is NULL

NOTMUCH_STATUS_OUT_OF_MEMORY: Out of memory, creating message object

NOTMUCH_STATUS_XAPIAN_EXCEPTION: A Xapian exception occurred