aboutsummaryrefslogtreecommitdiffstats
path: root/src/database.rs
diff options
context:
space:
mode:
authorC. Morgan Hamill <me@cmhamill.org>2015-03-20 18:31:22 +0100
committerC. Morgan Hamill <me@cmhamill.org>2015-03-20 18:31:22 +0100
commit95d4fba8436417a6c27522ed9b51c19a9fd7c6f9 (patch)
tree207ec286049f158bfba74d892f8b0cbd56a60310 /src/database.rs
parent08a7366e0e561160a2b5a1dc01330f3f7f467469 (diff)
downloadmail-95d4fba8436417a6c27522ed9b51c19a9fd7c6f9.tar.gz
Make `to_str()` method generic over lifetime.
If I have this correct: The output `&str` will have the same lifetime as whatever the lifetime of the block in which it is called. This allows using it one the output of notmuch FFI calls, by propogating the lifetime of the safe wrapper object (e.g., `Database`) to the `&str` returned from `to_str()`. This mirrors the lifetime of the actual underlying C string. If I don't grok lifetimes as well as I think, this could be a lie. Future self: you should add unit tests to test the above explanation.
Diffstat (limited to 'src/database.rs')
0 files changed, 0 insertions, 0 deletions