lib: Add Note::delete()

This commit is contained in:
Matthias Beyer 2016-03-19 19:21:13 +01:00
parent 41bb6d6f53
commit 3a7c153f21
1 changed files with 5 additions and 0 deletions

View File

@ -81,6 +81,11 @@ impl<'a> Note<'a> {
self.entry.deref().get_content()
}
pub fn delete(store: &Store, name: String) -> Result<()> {
store.delete(ModuleEntryPath::new(name).into_storeid())
.map_err(|e| NE::new(NEK::StoreWriteError, Some(Box::new(e))))
}
}
impl<'a> Tagable for Note<'a> {