| Commit message (Collapse) | Author | Age |
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
Wrapper type for `ffi::notmuch_directory_t` pointer.
|
| |
|
|
| |
Use `AsRef<Path>` instead of `AsOsStr`.
|
| |
|
|
|
|
| |
RFC 529[1] has landed.
[1] https://github.com/rust-lang/rfcs/pull/529
|
| |
|
|
|
| |
Add `database::Database`, `database::Version`, and `database::Mode`
types.
|
| |
|
|
|
|
|
|
| |
Allows easy conversion of any `T: AsOsStr` to a `CString`, whose
`as_ptr()` method is quite convenient for FFI calls.
Note that `std::path::Path` implements `AsOsStr`, which means we can
easily take paths and get a pointer to `*const libc::c_char`.
|
| |
|
|
|
|
|
|
|
| |
Implement `Display`, `Error`, and various `FromError<T>` traits on
`Error`, allowing the use of `try!` on the various `Result` types in the
crate.
Note that currently the only error variants are those thrown from
a lower-level operation.
|
| |
|
|
|
|
|
|
| |
Allow easy mapping of borrowed C strings to borrowed strings with
appropriate lifetimes.
I have some doubts about this, as I'm not 100% on how lifetimes interact
with the notmuch-provided strings yet.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Implements enum types in pairs, specifying the type and variant names of
each, like so:
notmuch_enum! {
pub enum enum_name => EnumName {
variant_one => VariantOne,
variant_two => VariantTwo
}
}
Which expands to:
pub enum enum_name {
variant_one,
variant_two
}
pub enum EnumName {
VariantOne,
VariantTwo
}
The `NotmuchEnum` trait also entails two functions to convert between
the defined pairs, `from_notmuch_t()` and `to_notmuch_t()`. The macro
takes care of their implementation, also.
Yes, this is purely aesthetic whimsy: I wanted the types in the `ffi`
module to match the types from the `notmuch.h` file, and I wanted the
types I used within (and exported by) this crate to match the expected
Rust convention.
|
| | |
|
|
|
Use libc crate.
|