from_leaf_fn

Function from_leaf_fn 

Source
pub const fn from_leaf_fn<'i, F, O>(f: F) -> F
where F: Fn(&'i [u8]) -> LeafResult<'i, O> + Leaf<'i, Output = O>,
Expand description

Coerces the provided function/closure into a Leaf parser.

This function exists to help with type inference.