Function notmuch_sys::notmuch_database_find_message_by_filename
[−]
[src]
pub unsafe extern "C" fn notmuch_database_find_message_by_filename(
notmuch: *mut notmuch_database_t,
filename: *const c_char,
message: *mut *mut notmuch_message_t
) -> notmuch_status_t
Find a message with the given filename.
If the database contains a message with the given filename then, on
successful return (notmuch_status_t::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_t::SUCCESS
is returned, the
caller is supposed to check '*message' for NULL to find out whether the
message with the given filename is found.
Return value:
notmuch_status_t::SUCCESS
: Successful return, check '*message'notmuch_status_t::NULL_POINTER
: The given 'message' argument is NULLnotmuch_status_t::OUT_OF_MEMORY
: Out of memory, creating the message objectnotmuch_status_t::XAPIAN_EXCEPTION
: A Xapian exception occurrednotmuch_status_t::UPGRADE_REQUIRED
: The caller must upgrade the database to use this function.