Function combine::value
[−]
[src]
pub fn value<I, T>(v: T) -> Value<I, T> where
I: Stream,
T: Clone,
Always returns the value v
without consuming any input.
let result = value(42) .parse("hello world") .map(|x| x.0); assert_eq!(result, Ok(42));