Skip to main content

parse_header

Function parse_header 

pub fn parse_header<Types, R>(
    row: R,
) -> Result<<Types as NodeType>::BlockHeader, Error>
where Types: NodeType, R: Row, &'a str: for<'a> ColumnIndex<R>, Value: for<'a> Type<<R as Row>::Database> + for<'a> Decode<'a, <R as Row>::Database>,
Expand description

Extract a Header from a row.

We can’t implement [FromRow] for Header<Types> since Header<Types> is not actually a type defined in this crate; it’s just an alias for Types::BlockHeader. So this standalone function will have to do.