lib: Add Note::retrieve()
This commit is contained in:
parent
3a7c153f21
commit
831ff84b74
1 changed files with 6 additions and 0 deletions
|
@ -86,6 +86,12 @@ impl<'a> Note<'a> {
|
||||||
.map_err(|e| NE::new(NEK::StoreWriteError, Some(Box::new(e))))
|
.map_err(|e| NE::new(NEK::StoreWriteError, Some(Box::new(e))))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn retrieve(store: &Store, name: String) -> Result<Note> {
|
||||||
|
store.retrieve(ModuleEntryPath::new(name).into_storeid())
|
||||||
|
.map_err(|e| NE::new(NEK::StoreWriteError, Some(Box::new(e))))
|
||||||
|
.map(|entry| Note { entry: entry })
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> Tagable for Note<'a> {
|
impl<'a> Tagable for Note<'a> {
|
||||||
|
|
Loading…
Reference in a new issue