Skip to main content

Component

Enum Component 

Source
pub enum Component {
    Expr(Box<Expr>),
    Empty(Empty),
}
Expand description

The typed Component syntax category.

Variants§

§

Expr(Box<Expr>)

The Expr syntax alternative.

§

Empty(Empty)

The Empty syntax alternative.

Trait Implementations§

Source§

impl Debug for Component

Source§

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

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

impl From<AdjacentExpr> for Component

Source§

fn from(value: AdjacentExpr) -> Self

Converts to this type from the input type.
Source§

impl From<AngleBarList> for Component

Source§

fn from(value: AngleBarList) -> Self

Converts to this type from the input type.
Source§

impl From<Array> for Component

Source§

fn from(value: Array) -> Self

Converts to this type from the input type.
Source§

impl From<Assignment> for Component

Source§

fn from(value: Assignment) -> Self

Converts to this type from the input type.
Source§

impl From<BinaryExpr> for Component

Source§

fn from(value: BinaryExpr) -> Self

Converts to this type from the input type.
Source§

impl From<BreakExpr> for Component

Source§

fn from(value: BreakExpr) -> Self

Converts to this type from the input type.
Source§

impl From<Catch> for Component

Source§

fn from(value: Catch) -> Self

Converts to this type from the input type.
Source§

impl From<Collection> for Component

Source§

fn from(value: Collection) -> Self

Converts to this type from the input type.
Source§

impl From<ContinueExpr> for Component

Source§

fn from(value: ContinueExpr) -> Self

Converts to this type from the input type.
Source§

impl From<ControlFlow> for Component

Source§

fn from(value: ControlFlow) -> Self

Converts to this type from the input type.
Source§

impl From<DebugExpr> for Component

Source§

fn from(value: DebugExpr) -> Self

Converts to this type from the input type.
Source§

impl From<Empty> for Component

Source§

fn from(value: Empty) -> Self

Converts to this type from the input type.
Source§

impl From<EvaluatedAssignment> for Component

Source§

fn from(value: EvaluatedAssignment) -> Self

Converts to this type from the input type.
Source§

impl From<Expr> for Component

Source§

fn from(value: Expr) -> Self

Converts to this type from the input type.
Source§

impl From<FloatLiteral> for Component

Source§

fn from(value: FloatLiteral) -> Self

Converts to this type from the input type.
Source§

impl From<ForLoop> for Component

Source§

fn from(value: ForLoop) -> Self

Converts to this type from the input type.
Source§

impl From<GlobalBinding> for Component

Source§

fn from(value: GlobalBinding) -> Self

Converts to this type from the input type.
Source§

impl From<GlobalParallelAssignment> for Component

Source§

fn from(value: GlobalParallelAssignment) -> Self

Converts to this type from the input type.
Source§

impl From<Holder> for Component

Source§

fn from(value: Holder) -> Self

Converts to this type from the input type.
Source§

impl From<IfStatement> for Component

Source§

fn from(value: IfStatement) -> Self

Converts to this type from the input type.
Source§

impl From<Installation> for Component

Source§

fn from(value: Installation) -> Self

Converts to this type from the input type.
Source§

impl From<IntegerLiteral> for Component

Source§

fn from(value: IntegerLiteral) -> Self

Converts to this type from the input type.
Source§

impl From<LambdaExpression> for Component

Source§

fn from(value: LambdaExpression) -> Self

Converts to this type from the input type.
Source§

impl From<List> for Component

Source§

fn from(value: List) -> Self

Converts to this type from the input type.
Source§

impl From<Literal> for Component

Source§

fn from(value: Literal) -> Self

Converts to this type from the input type.
Source§

impl From<LocalBinding> for Component

Source§

fn from(value: LocalBinding) -> Self

Converts to this type from the input type.
Source§

impl From<LocalParallelAssignment> for Component

Source§

fn from(value: LocalParallelAssignment) -> Self

Converts to this type from the input type.
Source§

impl From<MethodInstallation> for Component

Source§

fn from(value: MethodInstallation) -> Self

Converts to this type from the input type.
Source§

impl From<NewInstallation> for Component

Source§

fn from(value: NewInstallation) -> Self

Converts to this type from the input type.
Source§

impl From<NewStatement> for Component

Source§

fn from(value: NewStatement) -> Self

Converts to this type from the input type.
Source§

impl From<OperatorAssignment> for Component

Source§

fn from(value: OperatorAssignment) -> Self

Converts to this type from the input type.
Source§

impl From<OperatorExpr> for Component

Source§

fn from(value: OperatorExpr) -> Self

Converts to this type from the input type.
Source§

impl From<OperatorInstallation> for Component

Source§

fn from(value: OperatorInstallation) -> Self

Converts to this type from the input type.
Source§

impl From<OptionExpression> for Component

Source§

fn from(value: OptionExpression) -> Self

Converts to this type from the input type.
Source§

impl From<ParallelAssignment> for Component

Source§

fn from(value: ParallelAssignment) -> Self

Converts to this type from the input type.
Source§

impl From<PostfixExpr> for Component

Source§

fn from(value: PostfixExpr) -> Self

Converts to this type from the input type.
Source§

impl From<PrefixExpr> for Component

Source§

fn from(value: PrefixExpr) -> Self

Converts to this type from the input type.
Source§

impl From<ProfilingExpr> for Component

Source§

fn from(value: ProfilingExpr) -> Self

Converts to this type from the input type.
Source§

impl From<QuoteExpression> for Component

Source§

fn from(value: QuoteExpression) -> Self

Converts to this type from the input type.
Source§

impl From<RawStringLiteral> for Component

Source§

fn from(value: RawStringLiteral) -> Self

Converts to this type from the input type.
Source§

impl From<ReturnExpr> for Component

Source§

fn from(value: ReturnExpr) -> Self

Converts to this type from the input type.
Source§

impl From<Sequence> for Component

Source§

fn from(value: Sequence) -> Self

Converts to this type from the input type.
Source§

impl From<SimpleBinding> for Component

Source§

fn from(value: SimpleBinding) -> Self

Converts to this type from the input type.
Source§

impl From<StringLiteral> for Component

Source§

fn from(value: StringLiteral) -> Self

Converts to this type from the input type.
Source§

impl From<Symbol> for Component

Source§

fn from(value: Symbol) -> Self

Converts to this type from the input type.
Source§

impl From<Throw> for Component

Source§

fn from(value: Throw) -> Self

Converts to this type from the input type.
Source§

impl From<Trap> for Component

Source§

fn from(value: Trap) -> Self

Converts to this type from the input type.
Source§

impl From<TryStatement> for Component

Source§

fn from(value: TryStatement) -> Self

Converts to this type from the input type.
Source§

impl From<WhileLoop> for Component

Source§

fn from(value: WhileLoop) -> Self

Converts to this type from the input type.
Source§

impl Lex for Component

Source§

fn to_tokens(&self, output: &mut TokenStream)

Appends this value’s token trees to output.
Source§

fn to_token_stream(&self) -> TokenStream

Emits this value into a fresh token stream.
Source§

fn to_m2(&self) -> String

Renders this value as normalized Macaulay2 source.
Source§

impl<N> Migrate<N> for Component
where N: ExternalCstNode,

Source§

fn matches(node: &N) -> bool

Reports whether node can migrate this typed value.
Source§

fn migrate(node: N) -> Result<Self, MigrateError>

Converts a matching external node into typed syntax. Read more
Source§

impl PrettyTree for Component

Source§

fn pretty_tree(&self) -> PrettyNode

Builds the presentation node for this syntax value.
Source§

impl Spanned for Component

Source§

fn try_span(&self) -> Option<Span>

Returns the smallest span covering this value, when its constituents share one source snapshot.
Source§

fn span(&self) -> Span

Returns the smallest span covering this value. Read more
Source§

fn expect_span(&self) -> Span

Returns this value’s span when one source snapshot covers it. Read more

Auto Trait Implementations§

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> 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, 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, <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.