Struct nom_grapheme_clusters::parse::Tag
source · pub struct Tag<'slice, 'seg>(pub &'slice [&'seg str]);
Expand description
A type usable as tag for a parser without having to create a proper
Span
.
Tuple Fields§
§0: &'slice [&'seg str]
A sequence of segment contents.
Implementations§
Trait Implementations§
source§impl<'slice, 'seg, 'span> Compare<&'span Span> for Tag<'slice, 'seg>
impl<'slice, 'seg, 'span> Compare<&'span Span> for Tag<'slice, 'seg>
source§fn compare(&self, input: &'span Span) -> CompareResult
fn compare(&self, input: &'span Span) -> CompareResult
Compares self to another value for equality
source§fn compare_no_case(&self, input: &'span Span) -> CompareResult
fn compare_no_case(&self, input: &'span Span) -> CompareResult
Compares self to another value for equality
independently of the case. Read more
source§impl<'slice, 'seg, 'span> Compare<&'span SpanContent> for Tag<'slice, 'seg>
impl<'slice, 'seg, 'span> Compare<&'span SpanContent> for Tag<'slice, 'seg>
source§fn compare(&self, input: &'span SpanContent) -> CompareResult
fn compare(&self, input: &'span SpanContent) -> CompareResult
Compares self to another value for equality
source§fn compare_no_case(&self, input: &'span SpanContent) -> CompareResult
fn compare_no_case(&self, input: &'span SpanContent) -> CompareResult
Compares self to another value for equality
independently of the case. Read more
source§impl<'slice, 'seg, 'tag, 'span> Compare<&'tag Tag<'slice, 'seg>> for &'span Span
impl<'slice, 'seg, 'tag, 'span> Compare<&'tag Tag<'slice, 'seg>> for &'span Span
source§fn compare(&self, input: &'tag Tag<'slice, 'seg>) -> CompareResult
fn compare(&self, input: &'tag Tag<'slice, 'seg>) -> CompareResult
Compares self to another value for equality
source§fn compare_no_case(&self, input: &'tag Tag<'slice, 'seg>) -> CompareResult
fn compare_no_case(&self, input: &'tag Tag<'slice, 'seg>) -> CompareResult
Compares self to another value for equality
independently of the case. Read more
source§impl<'slice, 'seg, 'tag, 'span> Compare<&'tag Tag<'slice, 'seg>> for &'span SpanContent
impl<'slice, 'seg, 'tag, 'span> Compare<&'tag Tag<'slice, 'seg>> for &'span SpanContent
source§fn compare(&self, input: &'tag Tag<'slice, 'seg>) -> CompareResult
fn compare(&self, input: &'tag Tag<'slice, 'seg>) -> CompareResult
Compares self to another value for equality
source§fn compare_no_case(&self, input: &'tag Tag<'slice, 'seg>) -> CompareResult
fn compare_no_case(&self, input: &'tag Tag<'slice, 'seg>) -> CompareResult
Compares self to another value for equality
independently of the case. Read more
source§impl<'slice, 'seg, 'tag> Compare<&'tag Tag<'slice, 'seg>> for Span
impl<'slice, 'seg, 'tag> Compare<&'tag Tag<'slice, 'seg>> for Span
source§fn compare(&self, input: &'tag Tag<'slice, 'seg>) -> CompareResult
fn compare(&self, input: &'tag Tag<'slice, 'seg>) -> CompareResult
Compares self to another value for equality
source§fn compare_no_case(&self, input: &'tag Tag<'slice, 'seg>) -> CompareResult
fn compare_no_case(&self, input: &'tag Tag<'slice, 'seg>) -> CompareResult
Compares self to another value for equality
independently of the case. Read more
source§impl<'slice, 'seg, 'tag> Compare<&'tag Tag<'slice, 'seg>> for SpanContent
impl<'slice, 'seg, 'tag> Compare<&'tag Tag<'slice, 'seg>> for SpanContent
source§fn compare(&self, input: &'tag Tag<'slice, 'seg>) -> CompareResult
fn compare(&self, input: &'tag Tag<'slice, 'seg>) -> CompareResult
Compares self to another value for equality
source§fn compare_no_case(&self, input: &'tag Tag<'slice, 'seg>) -> CompareResult
fn compare_no_case(&self, input: &'tag Tag<'slice, 'seg>) -> CompareResult
Compares self to another value for equality
independently of the case. Read more
source§impl<'slice0, 'seg0, 'slice1, 'seg1, 'tag> Compare<&'tag Tag<'slice1, 'seg1>> for Tag<'slice0, 'seg0>
impl<'slice0, 'seg0, 'slice1, 'seg1, 'tag> Compare<&'tag Tag<'slice1, 'seg1>> for Tag<'slice0, 'seg0>
source§fn compare(&self, input: &'tag Tag<'slice1, 'seg1>) -> CompareResult
fn compare(&self, input: &'tag Tag<'slice1, 'seg1>) -> CompareResult
Compares self to another value for equality
source§fn compare_no_case(&self, input: &'tag Tag<'slice1, 'seg1>) -> CompareResult
fn compare_no_case(&self, input: &'tag Tag<'slice1, 'seg1>) -> CompareResult
Compares self to another value for equality
independently of the case. Read more
source§impl<'slice0, 'seg0, 'slice1, 'seg1, 'tag0, 'tag1> Compare<&'tag1 Tag<'slice1, 'seg1>> for &'tag0 Tag<'slice0, 'seg0>
impl<'slice0, 'seg0, 'slice1, 'seg1, 'tag0, 'tag1> Compare<&'tag1 Tag<'slice1, 'seg1>> for &'tag0 Tag<'slice0, 'seg0>
source§fn compare(&self, input: &'tag1 Tag<'slice1, 'seg1>) -> CompareResult
fn compare(&self, input: &'tag1 Tag<'slice1, 'seg1>) -> CompareResult
Compares self to another value for equality
source§fn compare_no_case(&self, input: &'tag1 Tag<'slice1, 'seg1>) -> CompareResult
fn compare_no_case(&self, input: &'tag1 Tag<'slice1, 'seg1>) -> CompareResult
Compares self to another value for equality
independently of the case. Read more
source§impl<'slice, 'seg, 'span> Compare<Span> for Tag<'slice, 'seg>
impl<'slice, 'seg, 'span> Compare<Span> for Tag<'slice, 'seg>
source§fn compare(&self, input: Span) -> CompareResult
fn compare(&self, input: Span) -> CompareResult
Compares self to another value for equality
source§fn compare_no_case(&self, input: Span) -> CompareResult
fn compare_no_case(&self, input: Span) -> CompareResult
Compares self to another value for equality
independently of the case. Read more
source§impl<'slice, 'seg, 'span> Compare<SpanContent> for Tag<'slice, 'seg>
impl<'slice, 'seg, 'span> Compare<SpanContent> for Tag<'slice, 'seg>
source§fn compare(&self, input: SpanContent) -> CompareResult
fn compare(&self, input: SpanContent) -> CompareResult
Compares self to another value for equality
source§fn compare_no_case(&self, input: SpanContent) -> CompareResult
fn compare_no_case(&self, input: SpanContent) -> CompareResult
Compares self to another value for equality
independently of the case. Read more
source§impl<'slice, 'seg, 'span> Compare<Tag<'slice, 'seg>> for &'span Span
impl<'slice, 'seg, 'span> Compare<Tag<'slice, 'seg>> for &'span Span
source§fn compare(&self, input: Tag<'slice, 'seg>) -> CompareResult
fn compare(&self, input: Tag<'slice, 'seg>) -> CompareResult
Compares self to another value for equality
source§fn compare_no_case(&self, input: Tag<'slice, 'seg>) -> CompareResult
fn compare_no_case(&self, input: Tag<'slice, 'seg>) -> CompareResult
Compares self to another value for equality
independently of the case. Read more
source§impl<'slice, 'seg, 'span> Compare<Tag<'slice, 'seg>> for &'span SpanContent
impl<'slice, 'seg, 'span> Compare<Tag<'slice, 'seg>> for &'span SpanContent
source§fn compare(&self, input: Tag<'slice, 'seg>) -> CompareResult
fn compare(&self, input: Tag<'slice, 'seg>) -> CompareResult
Compares self to another value for equality
source§fn compare_no_case(&self, input: Tag<'slice, 'seg>) -> CompareResult
fn compare_no_case(&self, input: Tag<'slice, 'seg>) -> CompareResult
Compares self to another value for equality
independently of the case. Read more
source§impl<'slice, 'seg> Compare<Tag<'slice, 'seg>> for Span
impl<'slice, 'seg> Compare<Tag<'slice, 'seg>> for Span
source§fn compare(&self, input: Tag<'slice, 'seg>) -> CompareResult
fn compare(&self, input: Tag<'slice, 'seg>) -> CompareResult
Compares self to another value for equality
source§fn compare_no_case(&self, input: Tag<'slice, 'seg>) -> CompareResult
fn compare_no_case(&self, input: Tag<'slice, 'seg>) -> CompareResult
Compares self to another value for equality
independently of the case. Read more
source§impl<'slice, 'seg> Compare<Tag<'slice, 'seg>> for SpanContent
impl<'slice, 'seg> Compare<Tag<'slice, 'seg>> for SpanContent
source§fn compare(&self, input: Tag<'slice, 'seg>) -> CompareResult
fn compare(&self, input: Tag<'slice, 'seg>) -> CompareResult
Compares self to another value for equality
source§fn compare_no_case(&self, input: Tag<'slice, 'seg>) -> CompareResult
fn compare_no_case(&self, input: Tag<'slice, 'seg>) -> CompareResult
Compares self to another value for equality
independently of the case. Read more
source§impl<'slice0, 'seg0, 'slice1, 'seg1, 'tag> Compare<Tag<'slice1, 'seg1>> for &'tag Tag<'slice0, 'seg0>
impl<'slice0, 'seg0, 'slice1, 'seg1, 'tag> Compare<Tag<'slice1, 'seg1>> for &'tag Tag<'slice0, 'seg0>
source§fn compare(&self, input: Tag<'slice1, 'seg1>) -> CompareResult
fn compare(&self, input: Tag<'slice1, 'seg1>) -> CompareResult
Compares self to another value for equality
source§fn compare_no_case(&self, input: Tag<'slice1, 'seg1>) -> CompareResult
fn compare_no_case(&self, input: Tag<'slice1, 'seg1>) -> CompareResult
Compares self to another value for equality
independently of the case. Read more
source§impl<'slice0, 'seg0, 'slice1, 'seg1> Compare<Tag<'slice1, 'seg1>> for Tag<'slice0, 'seg0>
impl<'slice0, 'seg0, 'slice1, 'seg1> Compare<Tag<'slice1, 'seg1>> for Tag<'slice0, 'seg0>
source§fn compare(&self, input: Tag<'slice1, 'seg1>) -> CompareResult
fn compare(&self, input: Tag<'slice1, 'seg1>) -> CompareResult
Compares self to another value for equality
source§fn compare_no_case(&self, input: Tag<'slice1, 'seg1>) -> CompareResult
fn compare_no_case(&self, input: Tag<'slice1, 'seg1>) -> CompareResult
Compares self to another value for equality
independently of the case. Read more
source§impl<'slice, 'seg, 'tag, 'tok> FindToken<&'tok LocatedSegment> for &'tag Tag<'slice, 'seg>
impl<'slice, 'seg, 'tag, 'tok> FindToken<&'tok LocatedSegment> for &'tag Tag<'slice, 'seg>
source§fn find_token(&self, token: &'tok LocatedSegment) -> bool
fn find_token(&self, token: &'tok LocatedSegment) -> bool
Returns true if self contains the token
source§impl<'slice, 'seg, 'tok> FindToken<&'tok LocatedSegment> for Tag<'slice, 'seg>
impl<'slice, 'seg, 'tok> FindToken<&'tok LocatedSegment> for Tag<'slice, 'seg>
source§fn find_token(&self, token: &'tok LocatedSegment) -> bool
fn find_token(&self, token: &'tok LocatedSegment) -> bool
Returns true if self contains the token
source§impl<'slice, 'seg, 'tag, 'tok> FindToken<&'tok str> for &'tag Tag<'slice, 'seg>
impl<'slice, 'seg, 'tag, 'tok> FindToken<&'tok str> for &'tag Tag<'slice, 'seg>
source§fn find_token(&self, token: &'tok str) -> bool
fn find_token(&self, token: &'tok str) -> bool
Returns true if self contains the token
source§impl<'slice, 'seg, 'tok> FindToken<&'tok str> for Tag<'slice, 'seg>
impl<'slice, 'seg, 'tok> FindToken<&'tok str> for Tag<'slice, 'seg>
source§fn find_token(&self, token: &'tok str) -> bool
fn find_token(&self, token: &'tok str) -> bool
Returns true if self contains the token
source§impl<'slice, 'seg, 'tag, 'tok, 'tok_ref> FindToken<&'tok_ref &'tok str> for &'tag Tag<'slice, 'seg>
impl<'slice, 'seg, 'tag, 'tok, 'tok_ref> FindToken<&'tok_ref &'tok str> for &'tag Tag<'slice, 'seg>
source§fn find_token(&self, token: &'tok_ref &'tok str) -> bool
fn find_token(&self, token: &'tok_ref &'tok str) -> bool
Returns true if self contains the token
source§impl<'slice, 'seg, 'tok, 'tok_ref> FindToken<&'tok_ref &'tok str> for Tag<'slice, 'seg>
impl<'slice, 'seg, 'tok, 'tok_ref> FindToken<&'tok_ref &'tok str> for Tag<'slice, 'seg>
source§fn find_token(&self, token: &'tok_ref &'tok str) -> bool
fn find_token(&self, token: &'tok_ref &'tok str) -> bool
Returns true if self contains the token
source§impl<'slice, 'seg, 'tag, 'tok> FindToken<LocatedSegment> for &'tag Tag<'slice, 'seg>
impl<'slice, 'seg, 'tag, 'tok> FindToken<LocatedSegment> for &'tag Tag<'slice, 'seg>
source§fn find_token(&self, token: LocatedSegment) -> bool
fn find_token(&self, token: LocatedSegment) -> bool
Returns true if self contains the token
source§impl<'slice, 'seg, 'tok> FindToken<LocatedSegment> for Tag<'slice, 'seg>
impl<'slice, 'seg, 'tok> FindToken<LocatedSegment> for Tag<'slice, 'seg>
source§fn find_token(&self, token: LocatedSegment) -> bool
fn find_token(&self, token: LocatedSegment) -> bool
Returns true if self contains the token
source§impl<'slice, 'seg> InputIter for Tag<'slice, 'seg>
impl<'slice, 'seg> InputIter for Tag<'slice, 'seg>
§type Iter = Enumerate<<Tag<'slice, 'seg> as InputIter>::IterElem>
type Iter = Enumerate<<Tag<'slice, 'seg> as InputIter>::IterElem>
An iterator over the input type, producing the item and its position
for use with Slice. If we’re iterating over
&str
, the position
corresponds to the byte index of the charactersource§fn iter_indices(&self) -> Self::Iter
fn iter_indices(&self) -> Self::Iter
Returns an iterator over the elements and their byte offsets
source§fn iter_elements(&self) -> Self::IterElem
fn iter_elements(&self) -> Self::IterElem
Returns an iterator over the elements
source§impl<'slice, 'seg> InputLength for Tag<'slice, 'seg>
impl<'slice, 'seg> InputLength for Tag<'slice, 'seg>
source§impl<'slice, 'seg> InputTake for Tag<'slice, 'seg>
impl<'slice, 'seg> InputTake for Tag<'slice, 'seg>
source§fn take_split(&self, count: usize) -> (Self, Self)
fn take_split(&self, count: usize) -> (Self, Self)
Split the stream at the
count
byte offset. panics if count > lengthsource§impl<'slice, 'seg> InputTakeAtPosition for Tag<'slice, 'seg>
impl<'slice, 'seg> InputTakeAtPosition for Tag<'slice, 'seg>
source§fn split_at_position<P, E>(&self, predicate: P) -> IResult<Self, Self, E>where
P: Fn(Self::Item) -> bool,
E: ParseError<Self>,
fn split_at_position<P, E>(&self, predicate: P) -> IResult<Self, Self, E>where P: Fn(Self::Item) -> bool, E: ParseError<Self>,
Looks for the first element of the input type for which the condition returns true,
and returns the input up to this position. Read more
source§fn split_at_position1<P, E>(
&self,
predicate: P,
e: ErrorKind
) -> IResult<Self, Self, E>where
P: Fn(Self::Item) -> bool,
E: ParseError<Self>,
fn split_at_position1<P, E>( &self, predicate: P, e: ErrorKind ) -> IResult<Self, Self, E>where P: Fn(Self::Item) -> bool, E: ParseError<Self>,
Looks for the first element of the input type for which the condition returns true
and returns the input up to this position. Read more
source§fn split_at_position_complete<P, E>(
&self,
predicate: P
) -> IResult<Self, Self, E>where
P: Fn(Self::Item) -> bool,
E: ParseError<Self>,
fn split_at_position_complete<P, E>( &self, predicate: P ) -> IResult<Self, Self, E>where P: Fn(Self::Item) -> bool, E: ParseError<Self>,
Looks for the first element of the input type for which the condition returns true,
and returns the input up to this position. Read more
source§fn split_at_position1_complete<P, E>(
&self,
predicate: P,
e: ErrorKind
) -> IResult<Self, Self, E>where
P: Fn(Self::Item) -> bool,
E: ParseError<Self>,
fn split_at_position1_complete<P, E>( &self, predicate: P, e: ErrorKind ) -> IResult<Self, Self, E>where P: Fn(Self::Item) -> bool, E: ParseError<Self>,
Looks for the first element of the input type for which the condition returns true
and returns the input up to this position. Read more
source§impl<'slice, 'seg> IntoIterator for Tag<'slice, 'seg>
impl<'slice, 'seg> IntoIterator for Tag<'slice, 'seg>
source§impl<'slice, 'seg> Ord for Tag<'slice, 'seg>
impl<'slice, 'seg> Ord for Tag<'slice, 'seg>
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl<'slice, 'seg, T, E> Parser<T, T, E> for Tag<'slice, 'seg>where
T: InputTake + Compare<Self>,
E: ParseError<T>,
impl<'slice, 'seg, T, E> Parser<T, T, E> for Tag<'slice, 'seg>where T: InputTake + Compare<Self>, E: ParseError<T>,
source§fn parse(&mut self, input: T) -> IResult<T, T, E>
fn parse(&mut self, input: T) -> IResult<T, T, E>
A parser takes in input type, and returns a
Result
containing
either the remaining input and the output value, or an errorsource§fn map<G, O2>(self, g: G) -> Map<Self, G, O>where
G: Fn(O) -> O2,
Self: Sized,
fn map<G, O2>(self, g: G) -> Map<Self, G, O>where G: Fn(O) -> O2, Self: Sized,
Maps a function over the result of a parser
source§fn flat_map<G, H, O2>(self, g: G) -> FlatMap<Self, G, O>where
G: FnMut(O) -> H,
H: Parser<I, O2, E>,
Self: Sized,
fn flat_map<G, H, O2>(self, g: G) -> FlatMap<Self, G, O>where G: FnMut(O) -> H, H: Parser<I, O2, E>, Self: Sized,
Creates a second parser from the output of the first one, then apply over the rest of the input
source§fn and_then<G, O2>(self, g: G) -> AndThen<Self, G, O>where
G: Parser<O, O2, E>,
Self: Sized,
fn and_then<G, O2>(self, g: G) -> AndThen<Self, G, O>where G: Parser<O, O2, E>, Self: Sized,
Applies a second parser over the output of the first one
source§fn and<G, O2>(self, g: G) -> And<Self, G>where
G: Parser<I, O2, E>,
Self: Sized,
fn and<G, O2>(self, g: G) -> And<Self, G>where G: Parser<I, O2, E>, Self: Sized,
Applies a second parser after the first one, return their results as a tuple
source§impl<'slice, 'seg> PartialEq<Tag<'slice, 'seg>> for Tag<'slice, 'seg>
impl<'slice, 'seg> PartialEq<Tag<'slice, 'seg>> for Tag<'slice, 'seg>
source§impl<'slice, 'seg> PartialOrd<Tag<'slice, 'seg>> for Tag<'slice, 'seg>
impl<'slice, 'seg> PartialOrd<Tag<'slice, 'seg>> for Tag<'slice, 'seg>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl<'slice, 'seg> Copy for Tag<'slice, 'seg>
impl<'slice, 'seg> Eq for Tag<'slice, 'seg>
impl<'slice, 'seg> StructuralEq for Tag<'slice, 'seg>
impl<'slice, 'seg> StructuralPartialEq for Tag<'slice, 'seg>
Auto Trait Implementations§
impl<'slice, 'seg> RefUnwindSafe for Tag<'slice, 'seg>
impl<'slice, 'seg> Send for Tag<'slice, 'seg>
impl<'slice, 'seg> Sync for Tag<'slice, 'seg>
impl<'slice, 'seg> Unpin for Tag<'slice, 'seg>
impl<'slice, 'seg> UnwindSafe for Tag<'slice, 'seg>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more