Impl Tagable for Entry for convenience
This commit is contained in:
parent
b3960bbf95
commit
5adc8504be
1 changed files with 27 additions and 0 deletions
|
@ -114,3 +114,30 @@ impl Tagable for EntryHeader {
|
|||
|
||||
}
|
||||
|
||||
impl Tagable for Entry {
|
||||
|
||||
fn get_tags(&self) -> Result<Vec<Tag>> {
|
||||
self.get_header().get_tags()
|
||||
}
|
||||
|
||||
fn set_tags(&mut self, ts: Vec<Tag>) -> Result<()> {
|
||||
self.get_header_mut().set_tags(ts)
|
||||
}
|
||||
|
||||
fn add_tag(&mut self, t: Tag) -> Result<()> {
|
||||
self.get_header_mut().add_tag(t)
|
||||
}
|
||||
|
||||
fn remove_tag(&mut self, t: Tag) -> Result<()> {
|
||||
self.get_header_mut().remove_tag(t)
|
||||
}
|
||||
|
||||
fn has_tag(&self, t: &Tag) -> Result<bool> {
|
||||
self.get_header().has_tag(t)
|
||||
}
|
||||
|
||||
fn has_tags(&self, ts: &Vec<Tag>) -> Result<bool> {
|
||||
self.get_header().has_tags(ts)
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue