Function rusty_parser::constant

source ·
pub fn constant<Output>(output: Output) -> ConstantParser<Output>
where Output: Tuple + Clone,
Expand description

This Parser will always success and return the clone of given output.

Output: Output you provided

§Example

use rusty_parser as rp;
use rp::IntoParser;

let parser = rp::constant( (1, 2, 3) );