Skip to main content

Rule

Enum Rule 

Source
pub enum Rule {
Show 434 variants EOI, WHITESPACE, COMMENT, line_comment, block_comment, doc_comment, doc_comment_line, program_doc_comment, program_doc_comment_head, program, item_or_error, item_recovery, item_sync_point, item_sync_keyword, item, item_core, module_path, path_segment, import_stmt, use_word_boundary, module_decl, import_item_list, import_item, annotation_import_item, regular_import_item, pub_item, export_spec_list, export_spec, type_alias_def, builtin_type_decl, comptime_field_overrides, comptime_field_override, struct_type_def, native_struct_type_def, struct_field_list, documented_struct_field, struct_field, comptime_keyword, comptime_block, comptime_for_expr, annotated_expr, interface_def, type_params, documented_type_param_name, type_param_name, trait_bound_list, interface_body, interface_member_list, interface_member_separator, documented_interface_member, interface_member, trait_def, supertrait_list, trait_body, trait_member, trait_member_core, associated_type_decl, impl_block, impl_member, impl_name, associated_type_binding, enum_def, enum_member_list, enum_member_separator, documented_enum_member, enum_member, enum_variant_unit, enum_variant_tuple, enum_variant_struct, extend_statement, type_name, documented_method_def, method_def, method_name, when_clause, function_keyword, async_keyword, foreign_function_def, extern_native_function_def, extern_abi, extern_native_link, extern_native_library, extern_native_symbol, foreign_language_id, foreign_body, foreign_body_content, function_def, builtin_function_decl, where_clause, where_predicate, annotations, annotation, annotation_name, annotation_ref, annotation_args, annotation_def, annotation_def_params, annotation_body, annotation_body_item, annotation_targets_decl, annotation_target_kind, annotation_handler, annotation_handler_kind, comptime_annotation_handler_phase, annotation_handler_params, annotation_handler_param, function_params, function_param, param_const_keyword, param_ref_keyword, param_out_keyword, param_mut_keyword, function_body, statement_or_error, stmt_recovery, stmt_sync_point, stmt_sync_keyword, return_type, function_expr, pipe_lambda, statement, remove_target_stmt, set_param_value_stmt, set_param_type_stmt, set_return_stmt, set_return_expr_payload, replace_body_stmt, replace_body_expr_payload, replace_module_stmt, replace_module_expr_payload, return_stmt, if_stmt, else_clause, for_loop, for_clause, while_loop, break_stmt, continue_stmt, stream_def, stream_body, stream_config, stream_config_list, stream_config_item, symbol_list, stream_state, stream_state_list, stream_on_connect, stream_on_disconnect, stream_on_event, stream_on_window, stream_on_error, datasource_def, query_decl, optimize_statement, param_range, metric_expr, query, with_query, cte_list, cte_def, cte_columns, recursive_keyword, inner_query, alert_query, pattern_ref, metric_list, param_list, param, alert_options, analysis_target, query_where_clause, on_clause, having_clause, order_by_clause, order_by_list, order_by_item, sort_direction, limit_clause, window_function_call, window_function_name, window_function_args, over_clause, window_spec, partition_by_clause, window_frame_clause, frame_type, frame_extent, frame_bound, join_clause, join_type, join_source, join_condition, time_window, last_window, between_window, window_range, session_window, window_args, expression_stmt, variable_decl, table_row_init, ownership_modifier, var_keyword, var_mut_modifier, return_keyword, break_keyword, continue_keyword, await_keyword, assignment, destructure_pattern, destructure_ident_pattern, destructure_array_pattern, destructure_object_pattern, destructure_object_pattern_field, destructure_rest_pattern, destructure_decomposition_pattern, decomposition_binding, decomposition_field_set, type_annotation, union_type, intersection_type, optional_type, primary_type, non_array_type, unit_type, dyn_type, basic_type, tuple_type, object_type, object_type_member_list, object_type_separator, object_type_member, function_type, type_param_list, type_param, generic_type, expression, compound_assign_op, assign_op, assignment_expr, pipe_expr, ternary_expr, ternary_branch, ternary_expr_no_range, assignment_expr_no_range, null_coalesce_expr_no_range, context_expr_no_range, or_expr_no_range, and_expr_no_range, bitwise_or_expr_no_range, bitwise_xor_expr_no_range, bitwise_and_expr_no_range, comparison_expr_no_range, comparison_tail_no_range, fuzzy_comparison_tail_no_range, null_coalesce_expr, context_expr, or_expr, and_expr, bitwise_or_expr, bitwise_xor_expr, bitwise_and_expr, comparison_expr, comparison_tail, fuzzy_comparison_tail, fuzzy_op, within_clause, tolerance_spec, range_expr, range_op, comparison_op, additive_expr, shift_expr, multiplicative_expr, exponential_expr, unary_expr, ref_expr, ref_mut_keyword, postfix_expr, try_operator, ternary_lookahead, balanced_ternary, balanced_ternary_inner, as_keyword, type_assertion_suffix, using_impl_suffix, property_access, optional_property_access, index_access, function_call, index_expr, arg_list, argument, named_arg, primary_expr, await_expr, join_expr, join_kind, join_branch_list, join_branch, struct_literal, qualified_function_call_expr, enum_constructor_expr, enum_variant_path, enum_tuple_payload, enum_struct_payload, some_expr, if_expr, if_expr_else, async_let_expr, async_scope_expr, while_expr, for_expr, for_expr_clause, loop_expr, let_expr, match_expr, match_scrutinee, match_scrutinee_ident, match_arm, break_expr, continue_expr, return_expr, pattern, pattern_literal, pattern_typed, pattern_identifier, pattern_array, pattern_object, pattern_field, pattern_wildcard, variant_ident, variant_keyword, pattern_constructor_name, pattern_constructor_keyword, pattern_constructor, pattern_qualified_constructor, pattern_unqualified_constructor, pattern_constructor_payload, pattern_constructor_tuple, pattern_constructor_struct, block_expr, block_items, block_statement, block_item, array_literal, array_elements, array_element, spread_element, list_comprehension, comprehension_clause, object_literal, object_fields, object_field_item, object_field, object_field_name, object_typed_field, object_value_field, object_spread, literal, char_literal, char_literal_inner, char_escape, char_unicode_escape, percent_literal, decimal, boolean, none_literal, unit_literal, data_ref, timeframe_spec, datetime_access, datetime_range, datetime_expr, datetime_primary, datetime_arithmetic, datetime_op, datetime_literal, timezone, duration, simple_duration, compound_duration, number_part, duration_unit, time_ref, quoted_time, named_time, relative_time, temporal_nav, back_nav, forward_nav, nav_amount, time_unit, timeframe_expr, from_query_expr, query_expr_inner, query_source_expr, query_clause, where_query_clause, order_by_query_clause, order_by_spec, query_sort_direction, group_by_query_clause, join_query_clause, let_query_clause, select_query_clause, pattern_name, qualified_ident, ident, keyword, integer, hex_integer, binary_integer, octal_integer, decimal_integer, int_width_suffix, number, string, formatted_prefix, content_prefix, string_escape, simple_string_char, fmt_block_string_char, fmt_block_string, fmt_block_char, fmt_nested_block, fmt_body_char, formatted_triple_string, formatted_simple_string, content_triple_string, content_simple_string, triple_string, simple_string, timeframe,
}

Variants§

§

EOI

End-of-input

§

WHITESPACE

§

COMMENT

§

line_comment

§

block_comment

§

doc_comment

§

doc_comment_line

§

program_doc_comment

§

program_doc_comment_head

§

program

§

item_or_error

§

item_recovery

§

item_sync_point

§

item_sync_keyword

§

item

§

item_core

§

module_path

§

path_segment

§

import_stmt

§

use_word_boundary

§

module_decl

§

import_item_list

§

import_item

§

annotation_import_item

§

regular_import_item

§

pub_item

§

export_spec_list

§

export_spec

§

type_alias_def

§

builtin_type_decl

§

comptime_field_overrides

§

comptime_field_override

§

struct_type_def

§

native_struct_type_def

§

struct_field_list

§

documented_struct_field

§

struct_field

§

comptime_keyword

§

comptime_block

§

comptime_for_expr

§

annotated_expr

§

interface_def

§

type_params

§

documented_type_param_name

§

type_param_name

§

trait_bound_list

§

interface_body

§

interface_member_list

§

interface_member_separator

§

documented_interface_member

§

interface_member

§

trait_def

§

supertrait_list

§

trait_body

§

trait_member

§

trait_member_core

§

associated_type_decl

§

impl_block

§

impl_member

§

impl_name

§

associated_type_binding

§

enum_def

§

enum_member_list

§

enum_member_separator

§

documented_enum_member

§

enum_member

§

enum_variant_unit

§

enum_variant_tuple

§

enum_variant_struct

§

extend_statement

§

type_name

§

documented_method_def

§

method_def

§

method_name

§

when_clause

§

function_keyword

§

async_keyword

§

foreign_function_def

§

extern_native_function_def

§

extern_abi

§

extern_native_library

§

extern_native_symbol

§

foreign_language_id

§

foreign_body

§

foreign_body_content

§

function_def

§

builtin_function_decl

§

where_clause

§

where_predicate

§

annotations

§

annotation

§

annotation_name

§

annotation_ref

§

annotation_args

§

annotation_def

§

annotation_def_params

§

annotation_body

§

annotation_body_item

§

annotation_targets_decl

§

annotation_target_kind

§

annotation_handler

§

annotation_handler_kind

§

comptime_annotation_handler_phase

§

annotation_handler_params

§

annotation_handler_param

§

function_params

§

function_param

§

param_const_keyword

§

param_ref_keyword

§

param_out_keyword

§

param_mut_keyword

§

function_body

§

statement_or_error

§

stmt_recovery

§

stmt_sync_point

§

stmt_sync_keyword

§

return_type

§

function_expr

§

pipe_lambda

§

statement

§

remove_target_stmt

§

set_param_value_stmt

§

set_param_type_stmt

§

set_return_stmt

§

set_return_expr_payload

§

replace_body_stmt

§

replace_body_expr_payload

§

replace_module_stmt

§

replace_module_expr_payload

§

return_stmt

§

if_stmt

§

else_clause

§

for_loop

§

for_clause

§

while_loop

§

break_stmt

§

continue_stmt

§

stream_def

§

stream_body

§

stream_config

§

stream_config_list

§

stream_config_item

§

symbol_list

§

stream_state

§

stream_state_list

§

stream_on_connect

§

stream_on_disconnect

§

stream_on_event

§

stream_on_window

§

stream_on_error

§

datasource_def

§

query_decl

§

optimize_statement

§

param_range

§

metric_expr

§

query

§

with_query

§

cte_list

§

cte_def

§

cte_columns

§

recursive_keyword

§

inner_query

§

alert_query

§

pattern_ref

§

metric_list

§

param_list

§

param

§

alert_options

§

analysis_target

§

query_where_clause

§

on_clause

§

having_clause

§

order_by_clause

§

order_by_list

§

order_by_item

§

sort_direction

§

limit_clause

§

window_function_call

§

window_function_name

§

window_function_args

§

over_clause

§

window_spec

§

partition_by_clause

§

window_frame_clause

§

frame_type

§

frame_extent

§

frame_bound

§

join_clause

§

join_type

§

join_source

§

join_condition

§

time_window

§

last_window

§

between_window

§

window_range

§

session_window

§

window_args

§

expression_stmt

§

variable_decl

§

table_row_init

§

ownership_modifier

§

var_keyword

§

var_mut_modifier

§

return_keyword

§

break_keyword

§

continue_keyword

§

await_keyword

§

assignment

§

destructure_pattern

§

destructure_ident_pattern

§

destructure_array_pattern

§

destructure_object_pattern

§

destructure_object_pattern_field

§

destructure_rest_pattern

§

destructure_decomposition_pattern

§

decomposition_binding

§

decomposition_field_set

§

type_annotation

§

union_type

§

intersection_type

§

optional_type

§

primary_type

§

non_array_type

§

unit_type

§

dyn_type

§

basic_type

§

tuple_type

§

object_type

§

object_type_member_list

§

object_type_separator

§

object_type_member

§

function_type

§

type_param_list

§

type_param

§

generic_type

§

expression

§

compound_assign_op

§

assign_op

§

assignment_expr

§

pipe_expr

§

ternary_expr

§

ternary_branch

§

ternary_expr_no_range

§

assignment_expr_no_range

§

null_coalesce_expr_no_range

§

context_expr_no_range

§

or_expr_no_range

§

and_expr_no_range

§

bitwise_or_expr_no_range

§

bitwise_xor_expr_no_range

§

bitwise_and_expr_no_range

§

comparison_expr_no_range

§

comparison_tail_no_range

§

fuzzy_comparison_tail_no_range

§

null_coalesce_expr

§

context_expr

§

or_expr

§

and_expr

§

bitwise_or_expr

§

bitwise_xor_expr

§

bitwise_and_expr

§

comparison_expr

§

comparison_tail

§

fuzzy_comparison_tail

§

fuzzy_op

§

within_clause

§

tolerance_spec

§

range_expr

§

range_op

§

comparison_op

§

additive_expr

§

shift_expr

§

multiplicative_expr

§

exponential_expr

§

unary_expr

§

ref_expr

§

ref_mut_keyword

§

postfix_expr

§

try_operator

§

ternary_lookahead

§

balanced_ternary

§

balanced_ternary_inner

§

as_keyword

§

type_assertion_suffix

§

using_impl_suffix

§

property_access

§

optional_property_access

§

index_access

§

function_call

§

index_expr

§

arg_list

§

argument

§

named_arg

§

primary_expr

§

await_expr

§

join_expr

§

join_kind

§

join_branch_list

§

join_branch

§

struct_literal

§

qualified_function_call_expr

§

enum_constructor_expr

§

enum_variant_path

§

enum_tuple_payload

§

enum_struct_payload

§

some_expr

§

if_expr

§

if_expr_else

§

async_let_expr

§

async_scope_expr

§

while_expr

§

for_expr

§

for_expr_clause

§

loop_expr

§

let_expr

§

match_expr

§

match_scrutinee

§

match_scrutinee_ident

§

match_arm

§

break_expr

§

continue_expr

§

return_expr

§

pattern

§

pattern_literal

§

pattern_typed

§

pattern_identifier

§

pattern_array

§

pattern_object

§

pattern_field

§

pattern_wildcard

§

variant_ident

§

variant_keyword

§

pattern_constructor_name

§

pattern_constructor_keyword

§

pattern_constructor

§

pattern_qualified_constructor

§

pattern_unqualified_constructor

§

pattern_constructor_payload

§

pattern_constructor_tuple

§

pattern_constructor_struct

§

block_expr

§

block_items

§

block_statement

§

block_item

§

array_literal

§

array_elements

§

array_element

§

spread_element

§

list_comprehension

§

comprehension_clause

§

object_literal

§

object_fields

§

object_field_item

§

object_field

§

object_field_name

§

object_typed_field

§

object_value_field

§

object_spread

§

literal

§

char_literal

§

char_literal_inner

§

char_escape

§

char_unicode_escape

§

percent_literal

§

decimal

§

boolean

§

none_literal

§

unit_literal

§

data_ref

§

timeframe_spec

§

datetime_access

§

datetime_range

§

datetime_expr

§

datetime_primary

§

datetime_arithmetic

§

datetime_op

§

datetime_literal

§

timezone

§

duration

§

simple_duration

§

compound_duration

§

number_part

§

duration_unit

§

time_ref

§

quoted_time

§

named_time

§

relative_time

§

temporal_nav

§

back_nav

§

forward_nav

§

nav_amount

§

time_unit

§

timeframe_expr

§

from_query_expr

§

query_expr_inner

§

query_source_expr

§

query_clause

§

where_query_clause

§

order_by_query_clause

§

order_by_spec

§

query_sort_direction

§

group_by_query_clause

§

join_query_clause

§

let_query_clause

§

select_query_clause

§

pattern_name

§

qualified_ident

§

ident

§

keyword

§

integer

§

hex_integer

§

binary_integer

§

octal_integer

§

decimal_integer

§

int_width_suffix

§

number

§

string

§

formatted_prefix

§

content_prefix

§

string_escape

§

simple_string_char

§

fmt_block_string_char

§

fmt_block_string

§

fmt_block_char

§

fmt_nested_block

§

fmt_body_char

§

formatted_triple_string

§

formatted_simple_string

§

content_triple_string

§

content_simple_string

§

triple_string

§

simple_string

§

timeframe

Implementations§

Source§

impl Rule

Source

pub fn all_rules() -> &'static [Rule]

Trait Implementations§

Source§

impl Clone for Rule

Source§

fn clone(&self) -> Rule

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Rule

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Hash for Rule

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl Ord for Rule

Source§

fn cmp(&self, other: &Rule) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
Source§

impl Parser<Rule> for ShapeParser

Source§

fn parse<'i>(rule: Rule, input: &'i str) -> Result<Pairs<'i, Rule>, Error<Rule>>

Parses a &str starting from rule.
Source§

impl PartialEq for Rule

Source§

fn eq(&self, other: &Rule) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialOrd for Rule

Source§

fn partial_cmp(&self, other: &Rule) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl Copy for Rule

Source§

impl Eq for Rule

Source§

impl StructuralPartialEq for Rule

Auto Trait Implementations§

§

impl Freeze for Rule

§

impl RefUnwindSafe for Rule

§

impl Send for Rule

§

impl Sync for Rule

§

impl Unpin for Rule

§

impl UnsafeUnpin for Rule

§

impl UnwindSafe for Rule

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> RuleType for T
where T: Copy + Debug + Eq + Hash + Ord,