aboutsummaryrefslogtreecommitdiffstats
path: root/src/utils.rs
diff options
context:
space:
mode:
authorDirk Van Haerenborgh <vhdirk@gmail.com>2018-10-16 21:01:58 +0200
committerDirk Van Haerenborgh <vhdirk@gmail.com>2018-10-24 07:12:55 +0200
commita4ffe47c51d1617fc0e728c7bbd7e9b3738878cb (patch)
tree017d0717ac8e2d5e0f6a46e47ea9e731ce63697b /src/utils.rs
parentb93d4cb749714699b44b2566e50a7086c2854ac7 (diff)
downloadmail-a4ffe47c51d1617fc0e728c7bbd7e9b3738878cb.tar.gz
some tries towards better lifetimes
Diffstat (limited to 'src/utils.rs')
-rw-r--r--src/utils.rs10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/utils.rs b/src/utils.rs
index bdc8c4f..9de7e08 100644
--- a/src/utils.rs
+++ b/src/utils.rs
@@ -4,10 +4,14 @@ use std::{
};
use libc;
-pub trait NewFromPtr<T> {
- fn new(ptr: T) -> Self;
+pub trait FromPtr<T> {
+ fn from_ptr(ptr: T) -> Self;
}
+// pub trait NewFromPtr<T, P> {
+// fn new(ptr: T, parent: Rc<P>) -> Self;
+// }
+
pub trait ToStr {
fn to_str<'a>(&self) -> Result<&'a str, str::Utf8Error>;
}
@@ -31,3 +35,5 @@ impl ToString for *const libc::c_char {
}
}
}
+
+