Struct leo_parser::parser::ParserContext [−][src]
Stores a program in tokenized format plus additional context.
May be converted into a Program
AST by parsing all tokens.
Implementations
impl ParserContext
[src]
pub fn new(tokens: Vec<SpannedToken>) -> Self
[src]
Returns a new ParserContext
type given a vector of tokens.
pub fn eof(&self) -> SyntaxError
[src]
Returns an unexpected end of function SyntaxError
.
pub fn peek(&self) -> SyntaxResult<&SpannedToken>
[src]
Returns a reference to the next token or error if it does not exist.
pub fn peek_token(&self) -> Cow<'_, Token>
[src]
pub fn has_next(&self) -> bool
[src]
Returns true if the next token exists.
pub fn eat(&mut self, token: Token) -> Option<SpannedToken>
[src]
Removes the next token if it exists and returns it, or None if the next token does not exist.
pub fn backtrack(&mut self, token: SpannedToken)
[src]
Appends a token to the back of the vector.
pub fn eat_identifier(&mut self) -> Option<Identifier>
[src]
Removes the next token if it is a [Token::Ident(_)
] and returns it, or None if
the next token is not a [Token::Ident(_)
] or if the next token does not exist.
pub fn eat_group_partial(
&mut self
) -> Option<SyntaxResult<(GroupCoordinate, GroupCoordinate, Span)>>
[src]
&mut self
) -> Option<SyntaxResult<(GroupCoordinate, GroupCoordinate, Span)>>
Removes the next two tokens if they are a pair of GroupCoordinate
and returns them,
or None if the next token is not a GroupCoordinate
.
pub fn eat_int(&mut self) -> Option<(PositiveNumber, Span)>
[src]
Removes the next token if it is a [Token::Int(_)
] and returns it, or None if
the next token is not a [Token::Int(_)
] or if the next token does not exist.
pub fn eat_any(&mut self, token: &[Token]) -> Option<SpannedToken>
[src]
Removes the next token if it exists and returns it, or None if the next token does not exist.
pub fn expect(&mut self, token: Token) -> SyntaxResult<Span>
[src]
Returns the span of the next token if it is equal to the given [Token
], or error.
pub fn expect_oneof(&mut self, token: &[Token]) -> SyntaxResult<SpannedToken>
[src]
Returns the span of the next token if it is equal to one of the given [Token
]s, or error.
pub fn expect_loose_identifier(&mut self) -> SyntaxResult<Identifier>
[src]
Returns the Identifier
of the next token if it is a keyword,
[Token::Int(_)
], or an Identifier
, or error.
pub fn expect_ident(&mut self) -> SyntaxResult<Identifier>
[src]
Returns the Identifier
of the next token if it is an Identifier
, or error.
pub fn expect_any(&mut self) -> SyntaxResult<SpannedToken>
[src]
Returns the next token if it exists or return end of function.
impl ParserContext
[src]
pub fn parse_expression(&mut self) -> SyntaxResult<Expression>
[src]
Returns an Expression
AST node if the next token is an expression.
Includes circuit init expressions.
pub fn parse_conditional_expression(&mut self) -> SyntaxResult<Expression>
[src]
Returns an Expression
AST node if the next tokens represent
a ternary expression. May or may not include circuit init expressions.
Otherwise, tries to parse the next token using [parse_disjunctive_expression
].
pub fn parse_disjunctive_expression(&mut self) -> SyntaxResult<Expression>
[src]
Returns an Expression
AST node if the next tokens represent
a binary or expression.
Otherwise, tries to parse the next token using [parse_conjunctive_expression
].
pub fn parse_conjunctive_expression(&mut self) -> SyntaxResult<Expression>
[src]
Returns an Expression
AST node if the next tokens represent a
binary and expression.
Otherwise, tries to parse the next token using [parse_bit_or_expression
].
pub fn parse_equality_expression(&mut self) -> SyntaxResult<Expression>
[src]
Returns an Expression
AST node if the next tokens represent a
binary bitwise or expression.
Otherwise, tries to parse the next token using [parse_bit_xor_expression
].
Returns an Expression
AST node if the next tokens represent a
binary bitwise xor expression.
Otherwise, tries to parse the next token using [parse_bit_and_expression
].
Returns an Expression
AST node if the next tokens represent a
binary bitwise and expression.
Otherwise, tries to parse the next token using [parse_equality_expression
].
Returns an Expression
AST node if the next tokens represent a
binary equals or not equals expression.
Otherwise, tries to parse the next token using [parse_ordering_expression
].
pub fn parse_ordering_expression(&mut self) -> SyntaxResult<Expression>
[src]
Returns an Expression
AST node if the next tokens represent a
binary relational expression: less than, less than or equals, greater than, greater than or equals.
Otherwise, tries to parse the next token using [parse_shift_expression
].
pub fn parse_additive_expression(&mut self) -> SyntaxResult<Expression>
[src]
Returns an Expression
AST node if the next tokens represent a
binary shift expression.
Otherwise, tries to parse the next token using [parse_additive_expression
].
Returns an Expression
AST node if the next tokens represent a
binary addition or subtraction expression.
Otherwise, tries to parse the next token using [parse_mul_div_pow_expression
].
pub fn parse_multiplicative_expression(&mut self) -> SyntaxResult<Expression>
[src]
Returns an Expression
AST node if the next tokens represent a
binary multiplication, division, or modulus expression.
Otherwise, tries to parse the next token using [parse_exponential_expression
].
pub fn parse_exponential_expression(&mut self) -> SyntaxResult<Expression>
[src]
Returns an Expression
AST node if the next tokens represent a
binary exponentiation expression.
Otherwise, tries to parse the next token using [parse_cast_expression
].
pub fn parse_cast_expression(&mut self) -> SyntaxResult<Expression>
[src]
Returns an Expression
AST node if the next tokens represent a
type cast expression.
Otherwise, tries to parse the next token using [parse_unary_expression
].
pub fn parse_unary_expression(&mut self) -> SyntaxResult<Expression>
[src]
Returns an Expression
AST node if the next tokens represent a
unary not, negate, or bitwise not expression.
Otherwise, tries to parse the next token using [parse_postfix_expression
].
pub fn parse_postfix_expression(&mut self) -> SyntaxResult<Expression>
[src]
Returns an Expression
AST node if the next tokens represent an
array access, circuit member access, function call, or static function call expression.
Otherwise, tries to parse the next token using [parse_primary_expression
].
pub fn parse_spread_or_expression(&mut self) -> SyntaxResult<SpreadOrExpression>
[src]
Returns a SpreadOrExpression
AST node if the next tokens represent an
spread or expression.
This method should only be called in the context of an array access expression.
pub fn parse_circuit_expression(
&mut self,
identifier: Identifier
) -> SyntaxResult<Expression>
[src]
&mut self,
identifier: Identifier
) -> SyntaxResult<Expression>
Returns an Expression
AST node if the next tokens represent an
circuit initialization expression.
pub fn parse_tuple_expression(
&mut self,
span: &Span
) -> SyntaxResult<Expression>
[src]
&mut self,
span: &Span
) -> SyntaxResult<Expression>
Returns an Expression
AST node if the next tokens represent an
tuple initialization expression.
pub fn parse_array_expression(
&mut self,
span: &Span
) -> SyntaxResult<Expression>
[src]
&mut self,
span: &Span
) -> SyntaxResult<Expression>
Returns an Expression
AST node if the next tokens represent an
array initialization expression.
pub fn parse_primary_expression(&mut self) -> SyntaxResult<Expression>
[src]
Returns an Expression
AST node if the next token is a primary expression:
- Literals: field, group, unsigned integer, signed integer, boolean, address
- Aggregate types: array, tuple
- Identifiers: variables, keywords
- self
Returns an expression error if the token cannot be matched.
impl ParserContext
[src]
pub fn parse_program(&mut self) -> SyntaxResult<Program>
[src]
Returns a Program
AST if all tokens can be consumed and represent a valid Leo program.
pub fn parse_annotation(&mut self) -> SyntaxResult<Annotation>
[src]
Returns an Annotation
AST node if the next tokens represent a supported annotation.
pub fn parse_package_accesses(&mut self) -> SyntaxResult<Vec<PackageAccess>>
[src]
Returns a vector of PackageAccess
AST nodes if the next tokens represent package access
expressions within an import statement.
pub fn parse_package_access(&mut self) -> SyntaxResult<PackageAccess>
[src]
Returns a PackageAccess
AST node if the next tokens represent a package access expression
within an import statement.
pub fn parse_package_name(&mut self) -> SyntaxResult<Identifier>
[src]
Returns an Identifier
AST node if the next tokens represent a valid package name.
pub fn parse_package_path(&mut self) -> SyntaxResult<PackageOrPackages>
[src]
Returns a PackageOrPackages
AST node if the next tokens represent a valid package import
with accesses.
pub fn parse_import(&mut self) -> SyntaxResult<ImportStatement>
[src]
Returns a ImportStatement
AST node if the next tokens represent an import statement.
pub fn parse_circuit_member(&mut self) -> SyntaxResult<CircuitMember>
[src]
Returns a CircuitMember
AST node if the next tokens represent a circuit member variable
or circuit member function.
pub fn parse_circuit(&mut self) -> SyntaxResult<(Identifier, Circuit)>
[src]
Returns an [(Identifier, Circuit)
] tuple of AST nodes if the next tokens represent a
circuit name and definition statement.
pub fn parse_function_parameters(&mut self) -> SyntaxResult<FunctionInput>
[src]
Returns a FunctionInput
AST node if the next tokens represent a function parameter.
pub fn parse_function_declaration(
&mut self
) -> SyntaxResult<(Identifier, Function)>
[src]
&mut self
) -> SyntaxResult<(Identifier, Function)>
Returns an [(Identifier, Function)
] AST node if the next tokens represent a function name
and function definition.
impl ParserContext
[src]
pub fn construct_assignee_access(
expr: Expression,
accesses: &mut Vec<AssigneeAccess>
) -> SyntaxResult<Identifier>
[src]
expr: Expression,
accesses: &mut Vec<AssigneeAccess>
) -> SyntaxResult<Identifier>
Returns an Identifier
AST node if the given Expression
AST node evaluates to an
identifier access. The access is stored in the given accesses.
pub fn construct_assignee(expr: Expression) -> SyntaxResult<Assignee>
[src]
Returns an Assignee
AST node from the given Expression
AST node with accesses.
pub fn parse_statement(&mut self) -> SyntaxResult<Statement>
[src]
Returns a Statement
AST node if the next tokens represent a statement.
pub fn parse_assign_statement(&mut self) -> SyntaxResult<Statement>
[src]
Returns a Block
AST node if the next tokens represent a assign, or expression statement.
pub fn parse_block(&mut self) -> SyntaxResult<Block>
[src]
Returns a Block
AST node if the next tokens represent a block of statements.
pub fn parse_return_statement(&mut self) -> SyntaxResult<ReturnStatement>
[src]
Returns a ReturnStatement
AST node if the next tokens represent a return statement.
pub fn parse_conditional_statement(
&mut self
) -> SyntaxResult<ConditionalStatement>
[src]
&mut self
) -> SyntaxResult<ConditionalStatement>
Returns a ConditionalStatement
AST node if the next tokens represent a conditional statement.
pub fn parse_loop_statement(&mut self) -> SyntaxResult<IterationStatement>
[src]
Returns an IterationStatement
AST node if the next tokens represent an iteration statement.
pub fn parse_formatted_string(&mut self) -> SyntaxResult<FormatString>
[src]
Returns a FormatString
AST node if the next tokens represent a formatted string.
pub fn parse_console_statement(&mut self) -> SyntaxResult<ConsoleStatement>
[src]
Returns a ConsoleStatement
AST node if the next tokens represent a console statement.
pub fn parse_variable_name(
&mut self,
span: &SpannedToken
) -> SyntaxResult<VariableName>
[src]
&mut self,
span: &SpannedToken
) -> SyntaxResult<VariableName>
Returns a VariableName
AST node if the next tokens represent a variable name with
valid keywords.
pub fn parse_definition_statement(
&mut self
) -> SyntaxResult<DefinitionStatement>
[src]
&mut self
) -> SyntaxResult<DefinitionStatement>
Returns a DefinitionStatement
AST node if the next tokens represent a definition statement.
impl ParserContext
[src]
pub fn token_to_int_type(token: Token) -> Option<IntegerType>
[src]
Returns a IntegerType
AST node if the given token is a supported integer type, or None
.
pub fn parse_array_dimensions(&mut self) -> SyntaxResult<ArrayDimensions>
[src]
Returns an ArrayDimensions
AST node if the next tokens represent dimensions for an array type.
pub fn parse_type(&mut self) -> SyntaxResult<(Type, Span)>
[src]
Returns a [(Type, Span)
] tuple of AST nodes if the next token represents a type. Also
returns the span of the parsed token.
Trait Implementations
impl Iterator for ParserContext
[src]
type Item = SpannedToken
The type of the elements being iterated over.
fn next(&mut self) -> Option<SpannedToken>
[src]
pub fn size_hint(&self) -> (usize, Option<usize>)
1.0.0[src]
pub fn count(self) -> usize
1.0.0[src]
pub fn last(self) -> Option<Self::Item>
1.0.0[src]
pub fn advance_by(&mut self, n: usize) -> Result<(), usize>
[src]
pub fn nth(&mut self, n: usize) -> Option<Self::Item>
1.0.0[src]
pub fn step_by(self, step: usize) -> StepBy<Self>
1.28.0[src]
pub fn chain<U>(self, other: U) -> Chain<Self, <U as IntoIterator>::IntoIter> where
U: IntoIterator<Item = Self::Item>,
1.0.0[src]
U: IntoIterator<Item = Self::Item>,
pub fn zip<U>(self, other: U) -> Zip<Self, <U as IntoIterator>::IntoIter> where
U: IntoIterator,
1.0.0[src]
U: IntoIterator,
pub fn intersperse(self, separator: Self::Item) -> Intersperse<Self> where
Self::Item: Clone,
[src]
Self::Item: Clone,
pub fn intersperse_with<G>(self, separator: G) -> IntersperseWith<Self, G> where
G: FnMut() -> Self::Item,
[src]
G: FnMut() -> Self::Item,
pub fn map<B, F>(self, f: F) -> Map<Self, F> where
F: FnMut(Self::Item) -> B,
1.0.0[src]
F: FnMut(Self::Item) -> B,
pub fn for_each<F>(self, f: F) where
F: FnMut(Self::Item),
1.21.0[src]
F: FnMut(Self::Item),
pub fn filter<P>(self, predicate: P) -> Filter<Self, P> where
P: FnMut(&Self::Item) -> bool,
1.0.0[src]
P: FnMut(&Self::Item) -> bool,
pub fn filter_map<B, F>(self, f: F) -> FilterMap<Self, F> where
F: FnMut(Self::Item) -> Option<B>,
1.0.0[src]
F: FnMut(Self::Item) -> Option<B>,
pub fn enumerate(self) -> Enumerate<Self>
1.0.0[src]
pub fn peekable(self) -> Peekable<Self>
1.0.0[src]
pub fn skip_while<P>(self, predicate: P) -> SkipWhile<Self, P> where
P: FnMut(&Self::Item) -> bool,
1.0.0[src]
P: FnMut(&Self::Item) -> bool,
pub fn take_while<P>(self, predicate: P) -> TakeWhile<Self, P> where
P: FnMut(&Self::Item) -> bool,
1.0.0[src]
P: FnMut(&Self::Item) -> bool,
pub fn map_while<B, P>(self, predicate: P) -> MapWhile<Self, P> where
P: FnMut(Self::Item) -> Option<B>,
[src]
P: FnMut(Self::Item) -> Option<B>,
pub fn skip(self, n: usize) -> Skip<Self>
1.0.0[src]
pub fn take(self, n: usize) -> Take<Self>
1.0.0[src]
pub fn scan<St, B, F>(self, initial_state: St, f: F) -> Scan<Self, St, F> where
F: FnMut(&mut St, Self::Item) -> Option<B>,
1.0.0[src]
F: FnMut(&mut St, Self::Item) -> Option<B>,
pub fn flat_map<U, F>(self, f: F) -> FlatMap<Self, U, F> where
F: FnMut(Self::Item) -> U,
U: IntoIterator,
1.0.0[src]
F: FnMut(Self::Item) -> U,
U: IntoIterator,
pub fn flatten(self) -> Flatten<Self> where
Self::Item: IntoIterator,
1.29.0[src]
Self::Item: IntoIterator,
pub fn fuse(self) -> Fuse<Self>
1.0.0[src]
pub fn inspect<F>(self, f: F) -> Inspect<Self, F> where
F: FnMut(&Self::Item),
1.0.0[src]
F: FnMut(&Self::Item),
pub fn by_ref(&mut self) -> &mut Self
1.0.0[src]
#[must_use =
"if you really need to exhaust the iterator, consider `.for_each(drop)` instead"]pub fn collect<B>(self) -> B where
B: FromIterator<Self::Item>,
1.0.0[src]
B: FromIterator<Self::Item>,
pub fn partition<B, F>(self, f: F) -> (B, B) where
B: Default + Extend<Self::Item>,
F: FnMut(&Self::Item) -> bool,
1.0.0[src]
B: Default + Extend<Self::Item>,
F: FnMut(&Self::Item) -> bool,
pub fn partition_in_place<'a, T, P>(self, predicate: P) -> usize where
Self: DoubleEndedIterator<Item = &'a mut T>,
T: 'a,
P: FnMut(&T) -> bool,
[src]
Self: DoubleEndedIterator<Item = &'a mut T>,
T: 'a,
P: FnMut(&T) -> bool,
pub fn is_partitioned<P>(self, predicate: P) -> bool where
P: FnMut(Self::Item) -> bool,
[src]
P: FnMut(Self::Item) -> bool,
pub fn try_fold<B, F, R>(&mut self, init: B, f: F) -> R where
F: FnMut(B, Self::Item) -> R,
R: Try<Ok = B>,
1.27.0[src]
F: FnMut(B, Self::Item) -> R,
R: Try<Ok = B>,
pub fn try_for_each<F, R>(&mut self, f: F) -> R where
F: FnMut(Self::Item) -> R,
R: Try<Ok = ()>,
1.27.0[src]
F: FnMut(Self::Item) -> R,
R: Try<Ok = ()>,
pub fn fold<B, F>(self, init: B, f: F) -> B where
F: FnMut(B, Self::Item) -> B,
1.0.0[src]
F: FnMut(B, Self::Item) -> B,
pub fn reduce<F>(self, f: F) -> Option<Self::Item> where
F: FnMut(Self::Item, Self::Item) -> Self::Item,
1.51.0[src]
F: FnMut(Self::Item, Self::Item) -> Self::Item,
pub fn all<F>(&mut self, f: F) -> bool where
F: FnMut(Self::Item) -> bool,
1.0.0[src]
F: FnMut(Self::Item) -> bool,
pub fn any<F>(&mut self, f: F) -> bool where
F: FnMut(Self::Item) -> bool,
1.0.0[src]
F: FnMut(Self::Item) -> bool,
pub fn find<P>(&mut self, predicate: P) -> Option<Self::Item> where
P: FnMut(&Self::Item) -> bool,
1.0.0[src]
P: FnMut(&Self::Item) -> bool,
pub fn find_map<B, F>(&mut self, f: F) -> Option<B> where
F: FnMut(Self::Item) -> Option<B>,
1.30.0[src]
F: FnMut(Self::Item) -> Option<B>,
pub fn try_find<F, R>(
&mut self,
f: F
) -> Result<Option<Self::Item>, <R as Try>::Error> where
F: FnMut(&Self::Item) -> R,
R: Try<Ok = bool>,
[src]
&mut self,
f: F
) -> Result<Option<Self::Item>, <R as Try>::Error> where
F: FnMut(&Self::Item) -> R,
R: Try<Ok = bool>,
pub fn position<P>(&mut self, predicate: P) -> Option<usize> where
P: FnMut(Self::Item) -> bool,
1.0.0[src]
P: FnMut(Self::Item) -> bool,
pub fn rposition<P>(&mut self, predicate: P) -> Option<usize> where
Self: ExactSizeIterator + DoubleEndedIterator,
P: FnMut(Self::Item) -> bool,
1.0.0[src]
Self: ExactSizeIterator + DoubleEndedIterator,
P: FnMut(Self::Item) -> bool,
pub fn max(self) -> Option<Self::Item> where
Self::Item: Ord,
1.0.0[src]
Self::Item: Ord,
pub fn min(self) -> Option<Self::Item> where
Self::Item: Ord,
1.0.0[src]
Self::Item: Ord,
pub fn max_by_key<B, F>(self, f: F) -> Option<Self::Item> where
B: Ord,
F: FnMut(&Self::Item) -> B,
1.6.0[src]
B: Ord,
F: FnMut(&Self::Item) -> B,
pub fn max_by<F>(self, compare: F) -> Option<Self::Item> where
F: FnMut(&Self::Item, &Self::Item) -> Ordering,
1.15.0[src]
F: FnMut(&Self::Item, &Self::Item) -> Ordering,
pub fn min_by_key<B, F>(self, f: F) -> Option<Self::Item> where
B: Ord,
F: FnMut(&Self::Item) -> B,
1.6.0[src]
B: Ord,
F: FnMut(&Self::Item) -> B,
pub fn min_by<F>(self, compare: F) -> Option<Self::Item> where
F: FnMut(&Self::Item, &Self::Item) -> Ordering,
1.15.0[src]
F: FnMut(&Self::Item, &Self::Item) -> Ordering,
pub fn rev(self) -> Rev<Self> where
Self: DoubleEndedIterator,
1.0.0[src]
Self: DoubleEndedIterator,
pub fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB) where
Self: Iterator<Item = (A, B)>,
FromA: Default + Extend<A>,
FromB: Default + Extend<B>,
1.0.0[src]
Self: Iterator<Item = (A, B)>,
FromA: Default + Extend<A>,
FromB: Default + Extend<B>,
pub fn copied<'a, T>(self) -> Copied<Self> where
Self: Iterator<Item = &'a T>,
T: 'a + Copy,
1.36.0[src]
Self: Iterator<Item = &'a T>,
T: 'a + Copy,
pub fn cloned<'a, T>(self) -> Cloned<Self> where
Self: Iterator<Item = &'a T>,
T: 'a + Clone,
1.0.0[src]
Self: Iterator<Item = &'a T>,
T: 'a + Clone,
pub fn cycle(self) -> Cycle<Self> where
Self: Clone,
1.0.0[src]
Self: Clone,
pub fn sum<S>(self) -> S where
S: Sum<Self::Item>,
1.11.0[src]
S: Sum<Self::Item>,
pub fn product<P>(self) -> P where
P: Product<Self::Item>,
1.11.0[src]
P: Product<Self::Item>,
pub fn cmp<I>(self, other: I) -> Ordering where
I: IntoIterator<Item = Self::Item>,
Self::Item: Ord,
1.5.0[src]
I: IntoIterator<Item = Self::Item>,
Self::Item: Ord,
pub fn cmp_by<I, F>(self, other: I, cmp: F) -> Ordering where
F: FnMut(Self::Item, <I as IntoIterator>::Item) -> Ordering,
I: IntoIterator,
[src]
F: FnMut(Self::Item, <I as IntoIterator>::Item) -> Ordering,
I: IntoIterator,
pub fn partial_cmp<I>(self, other: I) -> Option<Ordering> where
I: IntoIterator,
Self::Item: PartialOrd<<I as IntoIterator>::Item>,
1.5.0[src]
I: IntoIterator,
Self::Item: PartialOrd<<I as IntoIterator>::Item>,
pub fn partial_cmp_by<I, F>(self, other: I, partial_cmp: F) -> Option<Ordering> where
F: FnMut(Self::Item, <I as IntoIterator>::Item) -> Option<Ordering>,
I: IntoIterator,
[src]
F: FnMut(Self::Item, <I as IntoIterator>::Item) -> Option<Ordering>,
I: IntoIterator,
pub fn eq<I>(self, other: I) -> bool where
I: IntoIterator,
Self::Item: PartialEq<<I as IntoIterator>::Item>,
1.5.0[src]
I: IntoIterator,
Self::Item: PartialEq<<I as IntoIterator>::Item>,
pub fn eq_by<I, F>(self, other: I, eq: F) -> bool where
F: FnMut(Self::Item, <I as IntoIterator>::Item) -> bool,
I: IntoIterator,
[src]
F: FnMut(Self::Item, <I as IntoIterator>::Item) -> bool,
I: IntoIterator,
pub fn ne<I>(self, other: I) -> bool where
I: IntoIterator,
Self::Item: PartialEq<<I as IntoIterator>::Item>,
1.5.0[src]
I: IntoIterator,
Self::Item: PartialEq<<I as IntoIterator>::Item>,
pub fn lt<I>(self, other: I) -> bool where
I: IntoIterator,
Self::Item: PartialOrd<<I as IntoIterator>::Item>,
1.5.0[src]
I: IntoIterator,
Self::Item: PartialOrd<<I as IntoIterator>::Item>,
pub fn le<I>(self, other: I) -> bool where
I: IntoIterator,
Self::Item: PartialOrd<<I as IntoIterator>::Item>,
1.5.0[src]
I: IntoIterator,
Self::Item: PartialOrd<<I as IntoIterator>::Item>,
pub fn gt<I>(self, other: I) -> bool where
I: IntoIterator,
Self::Item: PartialOrd<<I as IntoIterator>::Item>,
1.5.0[src]
I: IntoIterator,
Self::Item: PartialOrd<<I as IntoIterator>::Item>,
pub fn ge<I>(self, other: I) -> bool where
I: IntoIterator,
Self::Item: PartialOrd<<I as IntoIterator>::Item>,
1.5.0[src]
I: IntoIterator,
Self::Item: PartialOrd<<I as IntoIterator>::Item>,
pub fn is_sorted(self) -> bool where
Self::Item: PartialOrd<Self::Item>,
[src]
Self::Item: PartialOrd<Self::Item>,
pub fn is_sorted_by<F>(self, compare: F) -> bool where
F: FnMut(&Self::Item, &Self::Item) -> Option<Ordering>,
[src]
F: FnMut(&Self::Item, &Self::Item) -> Option<Ordering>,
pub fn is_sorted_by_key<F, K>(self, f: F) -> bool where
K: PartialOrd<K>,
F: FnMut(Self::Item) -> K,
[src]
K: PartialOrd<K>,
F: FnMut(Self::Item) -> K,
Auto Trait Implementations
impl !RefUnwindSafe for ParserContext
impl !Send for ParserContext
impl !Sync for ParserContext
impl Unpin for ParserContext
impl UnwindSafe for ParserContext
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<I> IntoIterator for I where
I: Iterator,
[src]
I: Iterator,
type Item = <I as Iterator>::Item
The type of the elements being iterated over.
type IntoIter = I
Which kind of iterator are we turning this into?
pub fn into_iter(self) -> I
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,