aboutsummaryrefslogtreecommitdiffstats
path: root/src/ffi.rs
Commit message (Collapse)AuthorAge
* Implement `Error` for `NotmuchStatus`.C. Morgan Hamill2015-03-20
| | | | | | | | | | Entails implementation of `ToStr` and `Display`, also. Note that the `to_str()` method uses the `to_static_str()` method on the `ToStaticStr` trait internally --- this is how I expect to use the latter. This lets me provide a uniform `to_str()` method in the rest of the API, while transparently handling the differences between C string lifetimes.
* Add convenience methods to `notmuch_status_t`.C. Morgan Hamill2015-03-19
| | | | | Convenience methods for working the result of many of the native notmuch functions.
* Add `NotmuchEnum` trait and `notmuch_enum!` macro.C. Morgan Hamill2015-03-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Add notmuch C API bindings.C. Morgan Hamill2015-03-17
| | | | | The ffi module now reproduces the notmuch C API, as defined in `notmuch.h`, more-or-less verbatim.
* Add empty ffi module.C. Morgan Hamill2015-03-17