ThenRef is similar to Then, except it passes a reference to the input value rather than passing ownership. Then, it combines the input value with the output value of the closure in a 2-tuple.
This makes it more straightforward to have conditional parsing based on parsed values which are needed further down the combinator chain.
ThenRef
is similar toThen
, except it passes a reference to the input value rather than passing ownership. Then, it combines the input value with the output value of the closure in a 2-tuple.This makes it more straightforward to have conditional parsing based on parsed values which are needed further down the combinator chain.