Skip to main content

Rule

Enum Rule 

Source
pub enum Rule {
Show 146 variants EOI, WHITESPACE, comment, pax_component_definition, root_tag_pair, any_tag_pair, open_tag, closing_tag, self_closing_tag, matched_tag, inner_nodes, identifier, pascal_identifier, event_id, attribute_key_value_pair, class_attribute, class_value, class_string_list, attribute_transition_binding, attribute_event_binding, transition_id, transition_binding_value, transition_inline_timeline_value, transition_inline_timeline_body, double_binding, any_template_value, node_inner_content, string, inner, char, settings_block_declaration, settings_block_element, settings_conditional, settings_if_branch, settings_else_if_branch, settings_else_branch, settings_conditional_body, selector_block, literal_object, selector, settings_key_value_pair, settings_event_binding, settings_key, settings_value, timeline_block_declaration, timeline_block_setting, timeline_block_setting_value, timeline_selector_block, timeline_selector_body, timeline_property_key_value_pair, timeline_inline_value, timeline_track, timeline_keyframe, timeline_keyframe_value, timeline_marker, timeline_percent, timeline_duration, timeline_duration_unit, timeline_easing_curve, timeline_target, timeline_local_target, timeline_symbol, gradient_inline_value, gradient_body, gradient_shape_block, gradient_shape_key, gradient_shape_settings, gradient_shape_setting, gradient_shape_setting_value, gradient_stop, gradient_stop_marker, gradient_stop_value, literal_function, silent_comma, function_list, literal_value, literal_boolean, literal_some, literal_none, literal_option, literal_number_with_unit, literal_number, literal_number_integer, literal_number_float, literal_number_unit, literal_tuple, literal_tuple_access, literal_list, template_list_value, literal_list_access, literal_enum_value, literal_enum_args_list, literal_color, literal_color_space_func, literal_color_channel, xo_color_space_func, literal_color_const, expression_body, expression_ternary, expression_coalesce, expression_binary, expression_wrapped, expression_grouped, expression_grouped_unit, xo_primary, xo_prefix, xo_neg, xo_bool_not, xo_infix, xo_add, xo_bool_and, xo_bool_or, xo_div, xo_exp, xo_mod, xo_mul, xo_rel_eq, xo_rel_gt, xo_rel_gte, xo_rel_lt, xo_rel_lte, xo_rel_neq, xo_sub, xo_null_coalesce, xo_tern_then, xo_tern_else, xo_range, xo_range_exclusive, xo_literal, xo_object, xo_object_settings_key_value_pair, xo_symbol, xo_tuple, xo_list, xo_enum_or_function_call, xo_enum_or_function_args_list, statement_control_flow, statement_if, statement_if_branch, statement_else_if_branch, statement_else_branch, statement_for, statement_slot, statement_for_predicate_declaration, statement_for_source, statement_for_key,
}

Variants§

§

EOI

End-of-input

§

WHITESPACE

§

comment

§

pax_component_definition

/// ////// ////// BEGIN TEMPLATE ///

§

root_tag_pair

§

any_tag_pair

§

open_tag

§

closing_tag

§

self_closing_tag

§

matched_tag

§

inner_nodes

§

identifier

§

pascal_identifier

§

event_id

§

attribute_key_value_pair

§

class_attribute

§

class_value

§

class_string_list

§

attribute_transition_binding

§

attribute_event_binding

§

transition_id

§

transition_binding_value

§

transition_inline_timeline_value

§

transition_inline_timeline_body

§

double_binding

§

any_template_value

§

node_inner_content

§

string

§

inner

§

char

§

settings_block_declaration

/// ////// ////// BEGIN SETTINGS ///

§

settings_block_element

§

settings_conditional

§

settings_if_branch

§

settings_else_if_branch

§

settings_else_branch

§

settings_conditional_body

§

selector_block

§

literal_object

§

selector

§

settings_key_value_pair

§

settings_event_binding

§

settings_key

§

settings_value

§

timeline_block_declaration

/// ////// ////// BEGIN TIMELINES ///

§

timeline_block_setting

§

timeline_block_setting_value

§

timeline_selector_block

§

timeline_selector_body

§

timeline_property_key_value_pair

§

timeline_inline_value

§

timeline_track

§

timeline_keyframe

§

timeline_keyframe_value

§

timeline_marker

§

timeline_percent

§

timeline_duration

§

timeline_duration_unit

§

timeline_easing_curve

§

timeline_target

§

timeline_local_target

§

timeline_symbol

§

gradient_inline_value

/// ////// ////// BEGIN GRADIENTS ///

§

gradient_body

§

gradient_shape_block

§

gradient_shape_key

§

gradient_shape_settings

§

gradient_shape_setting

§

gradient_shape_setting_value

§

gradient_stop

§

gradient_stop_marker

§

gradient_stop_value

§

literal_function

§

silent_comma

§

function_list

§

literal_value

§

literal_boolean

§

literal_some

§

literal_none

§

literal_option

§

literal_number_with_unit

§

literal_number

§

literal_number_integer

§

literal_number_float

§

literal_number_unit

§

literal_tuple

§

literal_tuple_access

§

literal_list

§

template_list_value

§

literal_list_access

§

literal_enum_value

§

literal_enum_args_list

§

literal_color

/// ////// ////// BEGIN COLORS ///

§

literal_color_space_func

§

literal_color_channel

§

xo_color_space_func

§

literal_color_const

§

expression_body

/// ////// ////// BEGIN EXPRESSIONS This sub-grammar describes PAXEL, the Pax Expression Language ///

§

expression_ternary

§

expression_coalesce

§

expression_binary

§

expression_wrapped

§

expression_grouped

§

expression_grouped_unit

§

xo_primary

§

xo_prefix

§

xo_neg

§

xo_bool_not

§

xo_infix

§

xo_add

§

xo_bool_and

§

xo_bool_or

§

xo_div

§

xo_exp

§

xo_mod

§

xo_mul

§

xo_rel_eq

§

xo_rel_gt

§

xo_rel_gte

§

xo_rel_lt

§

xo_rel_lte

§

xo_rel_neq

§

xo_sub

§

xo_null_coalesce

§

xo_tern_then

§

xo_tern_else

§

xo_range

§

xo_range_exclusive

§

xo_literal

§

xo_object

§

xo_object_settings_key_value_pair

§

xo_symbol

§

xo_tuple

§

xo_list

§

xo_enum_or_function_call

§

xo_enum_or_function_args_list

§

statement_control_flow

/// ////// ////// BEGIN CONTROL FLOW ///

§

statement_if

§

statement_if_branch

§

statement_else_if_branch

§

statement_else_branch

§

statement_for

§

statement_slot

§

statement_for_predicate_declaration

§

statement_for_source

§

statement_for_key

Implementations§

Source§

impl Rule

Source

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

Trait Implementations§

Source§

impl Clone for Rule

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Copy for Rule

Source§

impl Debug for Rule

Source§

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

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

impl Eq for Rule

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: &Self) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 (const: unstable) · Source§

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

Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§

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

Compares and returns the minimum of two values. Read more
1.50.0 (const: unstable) · Source§

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

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

fn clamp_to<R>(self, range: R) -> Self
where Self: Sized, R: ClampBounds<Self>,

🔬This is a nightly-only experimental API. (clamp_to)
Restrict a value to a certain range. Read more
Source§

impl Parser<Rule> for PaxParser

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: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more
Source§

impl PartialOrd for Rule

Source§

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

This method returns an ordering between self and other values if one exists. Read more
1.0.0 (const: unstable) · 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 (const: unstable) · 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 (const: unstable) · 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 (const: unstable) · 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 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> RoundFrom<T> for T

Source§

fn round_from(x: T) -> T

Performs the conversion.
Source§

impl<T, U> RoundInto<U> for T
where U: RoundFrom<T>,

Source§

fn round_into(self) -> U

Performs the conversion.
Source§

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

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 = !

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

fn try_from(value: U) -> Result<T, !>

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<S, T> Upcast<T> for S
where T: UpcastFrom<S> + ?Sized, S: ?Sized,

Source§

fn upcast(&self) -> &T
where Self: ErasableGeneric, T: Sized + ErasableGeneric<Repr = Self::Repr>,

Perform a zero-cost type-safe upcast to a wider ref type within the Wasm bindgen generics type system. Read more
Source§

fn upcast_into(self) -> T
where Self: Sized + ErasableGeneric, T: Sized + ErasableGeneric<Repr = Self::Repr>,

Perform a zero-cost type-safe upcast to a wider type within the Wasm bindgen generics type system. Read more