pub trait Sample {
// Required methods
fn get<'a, 'h: 'a>(
&'a self,
header: &'h Header,
key: &str,
) -> Option<Result<Option<Value<'a>>>>;
fn get_index<'a, 'h: 'a>(
&'a self,
header: &'h Header,
i: usize,
) -> Option<Result<Option<Value<'a>>>>;
fn iter<'a, 'h: 'a>(
&'a self,
header: &'h Header,
) -> Box<dyn Iterator<Item = Result<(&'a str, Option<Value<'a>>)>> + 'a>;
}
Expand description
Variant record samples sample.
Required Methods§
sourcefn get<'a, 'h: 'a>(
&'a self,
header: &'h Header,
key: &str,
) -> Option<Result<Option<Value<'a>>>>
fn get<'a, 'h: 'a>( &'a self, header: &'h Header, key: &str, ) -> Option<Result<Option<Value<'a>>>>
Returns the value with the given key.