Skip to main content

PrefixOperator

Enum PrefixOperator 

Source
pub enum PrefixOperator {
Show 16 variants LstLst(_LstLst), PipSub(_PipSub), LstEqlEqlEql(_LstEqlEqlEql), LstEqlEql(_LstEqlEql), QsmQsm(_QsmQsm), Not(_Not), Lst(_Lst), LstEql(_LstEql), Gst(_Gst), GstEql(_GstEql), Qsm(_Qsm), Tld(_Tld), Add(_Add), Sub(_Sub), Mul(_Mul), Hsh(_Hsh),
}
Expand description

The typed PrefixOperator syntax category.

Variants§

§

LstLst(_LstLst)

The LstLst syntax alternative.

§

PipSub(_PipSub)

The PipSub syntax alternative.

§

LstEqlEqlEql(_LstEqlEqlEql)

The LstEqlEqlEql syntax alternative.

§

LstEqlEql(_LstEqlEql)

The LstEqlEql syntax alternative.

§

QsmQsm(_QsmQsm)

The QsmQsm syntax alternative.

§

Not(_Not)

The Not syntax alternative.

§

Lst(_Lst)

The Lst syntax alternative.

§

LstEql(_LstEql)

The LstEql syntax alternative.

§

Gst(_Gst)

The Gst syntax alternative.

§

GstEql(_GstEql)

The GstEql syntax alternative.

§

Qsm(_Qsm)

The Qsm syntax alternative.

§

Tld(_Tld)

The Tld syntax alternative.

§

Add(_Add)

The Add syntax alternative.

§

Sub(_Sub)

The Sub syntax alternative.

§

Mul(_Mul)

The Mul syntax alternative.

§

Hsh(_Hsh)

The Hsh syntax alternative.

Implementations§

Source§

impl PrefixOperator

Source

pub fn from_token_tree(token: TokenTree) -> Option<Self>

Converts a matching raw operator token into this category.

Source

pub fn from_token_tree_with_trivia( token: TokenTree, trailing_trivia: TrailingTrivia, ) -> Option<Self>

Converts a matching raw operator and its following trivia into this category.

Source

pub fn spelling(&self) -> &'static str

Returns the operator’s canonical source spelling.

Trait Implementations§

Source§

impl Debug for PrefixOperator

Source§

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

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

impl From<_Add> for PrefixOperator

Source§

fn from(value: _Add) -> Self

Converts to this type from the input type.
Source§

impl From<_Gst> for PrefixOperator

Source§

fn from(value: _Gst) -> Self

Converts to this type from the input type.
Source§

impl From<_GstEql> for PrefixOperator

Source§

fn from(value: _GstEql) -> Self

Converts to this type from the input type.
Source§

impl From<_Hsh> for PrefixOperator

Source§

fn from(value: _Hsh) -> Self

Converts to this type from the input type.
Source§

impl From<_Lst> for PrefixOperator

Source§

fn from(value: _Lst) -> Self

Converts to this type from the input type.
Source§

impl From<_LstEql> for PrefixOperator

Source§

fn from(value: _LstEql) -> Self

Converts to this type from the input type.
Source§

impl From<_LstEqlEql> for PrefixOperator

Source§

fn from(value: _LstEqlEql) -> Self

Converts to this type from the input type.
Source§

impl From<_LstEqlEqlEql> for PrefixOperator

Source§

fn from(value: _LstEqlEqlEql) -> Self

Converts to this type from the input type.
Source§

impl From<_LstLst> for PrefixOperator

Source§

fn from(value: _LstLst) -> Self

Converts to this type from the input type.
Source§

impl From<_Mul> for PrefixOperator

Source§

fn from(value: _Mul) -> Self

Converts to this type from the input type.
Source§

impl From<_Not> for PrefixOperator

Source§

fn from(value: _Not) -> Self

Converts to this type from the input type.
Source§

impl From<_PipSub> for PrefixOperator

Source§

fn from(value: _PipSub) -> Self

Converts to this type from the input type.
Source§

impl From<_Qsm> for PrefixOperator

Source§

fn from(value: _Qsm) -> Self

Converts to this type from the input type.
Source§

impl From<_QsmQsm> for PrefixOperator

Source§

fn from(value: _QsmQsm) -> Self

Converts to this type from the input type.
Source§

impl From<_Sub> for PrefixOperator

Source§

fn from(value: _Sub) -> Self

Converts to this type from the input type.
Source§

impl From<_Tld> for PrefixOperator

Source§

fn from(value: _Tld) -> Self

Converts to this type from the input type.
Source§

impl Lex for PrefixOperator

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 PrefixOperator
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 PrefixOperator

Source§

fn pretty_tree(&self) -> PrettyNode

Builds the presentation node for this syntax value.
Source§

impl Spanned for PrefixOperator

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.