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