pub trait HeaderExt: Header { // Provided method fn header(&self, id: &oid) -> Result<Header, Error> { ... } }
An extension trait with convenience functions.
Like try_header(…), but flattens the Result<Option<_>> into a single Result making a non-existing header an error.
try_header(…)
Result<Option<_>>
Result