pub fn cache(self) -> Parser<'a, I, O>
	where
		O: Clone + 'a,
	{
		use std::cell::RefCell;
		use std::collections::HashMap;
		let results = RefCell::new(HashMap::new());
		Parser::new(move |input: &'a [I], start: usize| {
			let key = (start, format!("{:p}", &self.method));
			results
				.borrow_mut()
				.entry(key)
				.or_insert_with(|| (self.method)(input, start))
				.clone()
		})
	}
/// Cache parser output result to speed up backtracking.
Cache parser output result to speed up backtracking.
Cache parser output result to speed up backtracking .
pub fn cache(self) -> Parser<'a, I, O>
	where
		O: Clone + 'a,
	{
		use std::cell::RefCell;
		use std::collections::HashMap;
		let results = RefCell::new(HashMap::new());
		Parser::new(move |input: &'a [I], start: usize| {
			let key = (start, format!("{:p}", &self.method));
			results
				.borrow_mut()
				.entry(key)
				.or_insert_with(|| (self.method)(input, start))
				.clone()
		})
	}
pub fn cache ( self ) -> Parser < ' a , I , O > where O : Clone + ' a , { use std :: cell :: RefCell ; use std :: collections :: HashMap ; let results = RefCell :: new ( HashMap :: new ( ) ) ; Parser :: new ( move | input : & ' a [ I ] , start : usize | { let key = ( start , format ! ( " " self method ) ) ; results . borrow_mut ( ) . entry ( key ) . or_insert_with ( | | ( self . method ) ( input , start ) ) . clone ( ) } ) }
Cache parser output result to speed up backtracking.
Cache parser output result to speed up backtracking .
self