Struct nom_config::Configured
[−]
[src]
pub struct Configured<T, Input> where
Input: InputLength, { /* fields omitted */ }
Configuration container
Methods
impl<T, Input> Configured<T, Input> where
Input: InputLength,
[src]
Input: InputLength,
fn new(config: T, input: Input) -> Self
Creates a new configuration container
fn config(&self) -> &T
Returns a reference to the configuration
fn input(&self) -> &Input
Returns a reference to the input
Trait Implementations
impl<T, Input> Into<(T, Input)> for Configured<T, Input> where
Input: InputLength,
[src]
Input: InputLength,
impl<T, Input> InputLength for Configured<T, Input> where
Input: InputLength,
[src]
Input: InputLength,
fn input_len(&self) -> usize
calculates the input length, as indicated by its name, and the name of the trait itself Read more
impl<T, Input> InputIter for Configured<T, Input> where
Input: InputLength + InputIter,
[src]
Input: InputLength + InputIter,
type Item = Input::Item
type RawItem = Input::RawItem
type Iter = Input::Iter
type IterElem = Input::IterElem
fn iter_indices(&self) -> Self::Iter
returns an iterator over the elements and their byte offsets
fn iter_elements(&self) -> Self::IterElem
returns an iterator over the elements
fn position<P>(&self, predicate: P) -> Option<usize> where
P: Fn(Self::RawItem) -> bool,
P: Fn(Self::RawItem) -> bool,
finds the byte position of the element
fn slice_index(&self, count: usize) -> Option<usize>
get the byte offset from the element's position in the stream
impl<T, Input> Slice<RangeFrom<usize>> for Configured<T, Input> where
Input: InputLength + Slice<RangeFrom<usize>>,
T: Clone,
[src]
Input: InputLength + Slice<RangeFrom<usize>>,
T: Clone,
impl<T, Input> Slice<RangeTo<usize>> for Configured<T, Input> where
Input: InputLength + Slice<RangeTo<usize>>,
T: Clone,
[src]
Input: InputLength + Slice<RangeTo<usize>>,
T: Clone,
impl<T, Input> Slice<Range<usize>> for Configured<T, Input> where
Input: InputLength + Slice<Range<usize>>,
T: Clone,
[src]
Input: InputLength + Slice<Range<usize>>,
T: Clone,
impl<T, Input> Deref for Configured<T, Input> where
Input: InputLength,
[src]
Input: InputLength,
type Target = Input
The resulting type after dereferencing
fn deref(&self) -> &Self::Target
The method called to dereference a value
impl<T, Input> Clone for Configured<T, Input> where
Input: InputLength + Clone,
T: Clone,
[src]
Input: InputLength + Clone,
T: Clone,
fn clone(&self) -> Self
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl<T, Input> AsBytes for Configured<T, Input> where
Input: InputLength + AsBytes,
[src]
Input: InputLength + AsBytes,
impl<T, Input> PartialEq<Configured<T, Input>> for Configured<T, Input> where
Input: InputLength + PartialEq,
[src]
Input: InputLength + PartialEq,
fn eq(&self, other: &Configured<T, Input>) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0
This method tests for !=
.
impl<T, Input> Copy for Configured<T, Input> where
Input: InputLength + Copy,
T: Copy,
[src]
Input: InputLength + Copy,
T: Copy,
impl<T, Input> Debug for Configured<T, Input> where
Input: InputLength + Debug,
T: Debug,
[src]
Input: InputLength + Debug,
T: Debug,