consumed

Function consumed 

Source
pub fn consumed<'a, O, E>(
    p: impl Pipe<&'a [u8], O, E>,
) -> impl Pipe<&'a [u8], (&'a [u8],), E>
Expand description

Returns the consumed input instead of the pipe result

assert_eq!(
    consumed(tag::<Error, _, _>(b"foo").and(tag(b"bar"))).apply(b"foobarbaz"),
    Ok((&b"baz"[..], (&b"foobar"[..],)))
);