Function combine::value [−][src]
pub fn value<Input, T>(v: T) -> Value<Input, T> where
Input: Stream,
T: Clone,
Expand description
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));