Function parsell::character_map_ref
[−]
[src]
pub fn character_map_ref<F>(
f: F
) -> Map<CharacterRef<IsSome<F>>, Dereference<Unwrap<F>>> where
F: Copy,
An uncommitted parser that reads one character by reference and applies a function to it.
The parser character_ref_map(f)
reads one character ch
from the input,
if f(&ch)
is Some(value)
then it commits and the result is value
,
otherwise it backtracks.
This does not require characters to be copyable.