Function notmuch_sys::notmuch_database_remove_message [] [src]

pub unsafe extern "C" fn notmuch_database_remove_message(
    database: *mut notmuch_database_t,
    filename: *const c_char
) -> notmuch_status_t

Remove a message filename from the given notmuch database. If the message has no more filenames, remove the message.

If the same message (as determined by the message ID) is still available via other filenames, then the message will persist in the database for those filenames. When the last filename is removed for a particular message, the database content for that message will be entirely removed.

Return value:

  • notmuch_status_t::SUCCESS: The last filename was removed and the message was removed from the database.

  • notmuch_status_t::XAPIAN_EXCEPTION: A Xapian exception occurred, message not removed.

  • notmuch_status_t::DUPLICATE_MESSAGE_ID: This filename was removed but the message persists in the database with at least one other filename.

  • notmuch_status_t::READ_ONLY_DATABASE: Database was opened in read-only mode so no message can be removed.

  • notmuch_status_t::UPGRADE_REQUIRED: The caller must upgrade the database to use this function.