pub mod field;
use std::io;
use self::field::{Tag, Value};
pub trait Data {
fn is_empty(&self) -> bool;
fn get(&self, tag: &Tag) -> Option<io::Result<Value<'_>>>;
fn iter(&self) -> Box<dyn Iterator<Item = io::Result<(Tag, Value<'_>)>> + '_>;
}
impl Data for Box<dyn Data + '_> {
fn is_empty(&self) -> bool {
(**self).is_empty()
}
fn get(&self, tag: &Tag) -> Option<io::Result<Value<'_>>> {
(**self).get(tag)
}
fn iter(&self) -> Box<dyn Iterator<Item = io::Result<(Tag, Value<'_>)>> + '_> {
(**self).iter()
}
}