Skip to main content

BinaryOperator

Enum BinaryOperator 

Source
pub enum BinaryOperator {
Show 96 variants GstGst(_GstGst), GstGstEql(_GstGstEql), LstLst(_LstLst), LstLstEql(_LstLstEql), PipSub(_PipSub), PipSubEql(_PipSubEql), EqlEqlEqlGst(_EqlEqlEqlGst), EqlEqlEqlGstEql(_EqlEqlEqlGstEql), LstEqlEqlEql(_LstEqlEqlEql), LstEqlEqlGst(_LstEqlEqlGst), LstEqlEqlGstEql(_LstEqlEqlGstEql), EqlEqlGst(_EqlEqlGst), EqlEqlGstEql(_EqlEqlGstEql), LstEqlEql(_LstEqlEql), Or(_Or), QsmQsm(_QsmQsm), QsmQsmEql(_QsmQsmEql), Xor(_Xor), And(_And), BngEql(_BngEql), EqlBngEql(_EqlBngEql), EqlEql(_EqlEql), EqlEqlEql(_EqlEqlEql), Lst(_Lst), LstEql(_LstEql), Gst(_Gst), GstEql(_GstEql), Qsm(_Qsm), Tld(_Tld), TldEql(_TldEql), PipPip(_PipPip), PipPipEql(_PipPipEql), Col(_Col), ColEql(_ColEql), Pip(_Pip), PipEql(_PipEql), CrtCrt(_CrtCrt), CrtCrtEql(_CrtCrtEql), Amp(_Amp), AmpEql(_AmpEql), DotDot(_DotDot), DotDotEql(_DotDotEql), DotDotLst(_DotDotLst), DotDotLstEql(_DotDotLstEql), AddAdd(_AddAdd), AddAddEql(_AddAddEql), Add(_Add), AddEql(_AddEql), Sub(_Sub), SubEql(_SubEql), Cdt(_Cdt), CdtEql(_CdtEql), MulMul(_MulMul), MulMulEql(_MulMulEql), Box(_Box), BoxEql(_BoxEql), Sfp(_Sfp), SfpEql(_SfpEql), Mod(_Mod), ModEql(_ModEql), Slh(_Slh), SlhEql(_SlhEql), SlhSlh(_SlhSlh), SlhSlhEql(_SlhSlhEql), Mul(_Mul), MulEql(_MulEql), Bsl(_Bsl), BslEql(_BslEql), BslBsl(_BslBsl), BslBslEql(_BslBslEql), Att(_Att), AttEql(_AttEql), AttAtt(_AttAtt), AttAttEql(_AttAttEql), AttAttQsm(_AttAttQsm), AttAttQsmEql(_AttAttQsmEql), HshQsm(_HshQsm), Dot(_Dot), DotQsm(_DotQsm), CrtLst(_CrtLst), CrtLstEql(_CrtLstEql), CrtGst(_CrtGst), CrtGstEql(_CrtGstEql), UbsLst(_UbsLst), UbsLstEql(_UbsLstEql), UbsGst(_UbsGst), UbsGstEql(_UbsGstEql), Crt(_Crt), CrtEql(_CrtEql), CrtMulMul(_CrtMulMul), CrtMulMulEql(_CrtMulMulEql), Ubs(_Ubs), UbsEql(_UbsEql), PipUbs(_PipUbs), PipUbsEql(_PipUbsEql), Hsh(_Hsh),
}
Expand description

The typed BinaryOperator syntax category.

Variants§

§

GstGst(_GstGst)

The GstGst syntax alternative.

§

GstGstEql(_GstGstEql)

The GstGstEql syntax alternative.

§

LstLst(_LstLst)

The LstLst syntax alternative.

§

LstLstEql(_LstLstEql)

The LstLstEql syntax alternative.

§

PipSub(_PipSub)

The PipSub syntax alternative.

§

PipSubEql(_PipSubEql)

The PipSubEql syntax alternative.

§

EqlEqlEqlGst(_EqlEqlEqlGst)

The EqlEqlEqlGst syntax alternative.

§

EqlEqlEqlGstEql(_EqlEqlEqlGstEql)

The EqlEqlEqlGstEql syntax alternative.

§

LstEqlEqlEql(_LstEqlEqlEql)

The LstEqlEqlEql syntax alternative.

§

LstEqlEqlGst(_LstEqlEqlGst)

The LstEqlEqlGst syntax alternative.

§

LstEqlEqlGstEql(_LstEqlEqlGstEql)

The LstEqlEqlGstEql syntax alternative.

§

EqlEqlGst(_EqlEqlGst)

The EqlEqlGst syntax alternative.

§

EqlEqlGstEql(_EqlEqlGstEql)

The EqlEqlGstEql syntax alternative.

§

LstEqlEql(_LstEqlEql)

The LstEqlEql syntax alternative.

§

Or(_Or)

The Or syntax alternative.

§

QsmQsm(_QsmQsm)

The QsmQsm syntax alternative.

§

QsmQsmEql(_QsmQsmEql)

The QsmQsmEql syntax alternative.

§

Xor(_Xor)

The Xor syntax alternative.

§

And(_And)

The And syntax alternative.

§

BngEql(_BngEql)

The BngEql syntax alternative.

§

EqlBngEql(_EqlBngEql)

The EqlBngEql syntax alternative.

§

EqlEql(_EqlEql)

The EqlEql syntax alternative.

§

EqlEqlEql(_EqlEqlEql)

The EqlEqlEql 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.

§

TldEql(_TldEql)

The TldEql syntax alternative.

§

PipPip(_PipPip)

The PipPip syntax alternative.

§

PipPipEql(_PipPipEql)

The PipPipEql syntax alternative.

§

Col(_Col)

The Col syntax alternative.

§

ColEql(_ColEql)

The ColEql syntax alternative.

§

Pip(_Pip)

The Pip syntax alternative.

§

PipEql(_PipEql)

The PipEql syntax alternative.

§

CrtCrt(_CrtCrt)

The CrtCrt syntax alternative.

§

CrtCrtEql(_CrtCrtEql)

The CrtCrtEql syntax alternative.

§

Amp(_Amp)

The Amp syntax alternative.

§

AmpEql(_AmpEql)

The AmpEql syntax alternative.

§

DotDot(_DotDot)

The DotDot syntax alternative.

§

DotDotEql(_DotDotEql)

The DotDotEql syntax alternative.

§

DotDotLst(_DotDotLst)

The DotDotLst syntax alternative.

§

DotDotLstEql(_DotDotLstEql)

The DotDotLstEql syntax alternative.

§

AddAdd(_AddAdd)

The AddAdd syntax alternative.

§

AddAddEql(_AddAddEql)

The AddAddEql syntax alternative.

§

Add(_Add)

The Add syntax alternative.

§

AddEql(_AddEql)

The AddEql syntax alternative.

§

Sub(_Sub)

The Sub syntax alternative.

§

SubEql(_SubEql)

The SubEql syntax alternative.

§

Cdt(_Cdt)

The Cdt syntax alternative.

§

CdtEql(_CdtEql)

The CdtEql syntax alternative.

§

MulMul(_MulMul)

The MulMul syntax alternative.

§

MulMulEql(_MulMulEql)

The MulMulEql syntax alternative.

§

Box(_Box)

The Box syntax alternative.

§

BoxEql(_BoxEql)

The BoxEql syntax alternative.

§

Sfp(_Sfp)

The Sfp syntax alternative.

§

SfpEql(_SfpEql)

The SfpEql syntax alternative.

§

Mod(_Mod)

The Mod syntax alternative.

§

ModEql(_ModEql)

The ModEql syntax alternative.

§

Slh(_Slh)

The Slh syntax alternative.

§

SlhEql(_SlhEql)

The SlhEql syntax alternative.

§

SlhSlh(_SlhSlh)

The SlhSlh syntax alternative.

§

SlhSlhEql(_SlhSlhEql)

The SlhSlhEql syntax alternative.

§

Mul(_Mul)

The Mul syntax alternative.

§

MulEql(_MulEql)

The MulEql syntax alternative.

§

Bsl(_Bsl)

The Bsl syntax alternative.

§

BslEql(_BslEql)

The BslEql syntax alternative.

§

BslBsl(_BslBsl)

The BslBsl syntax alternative.

§

BslBslEql(_BslBslEql)

The BslBslEql syntax alternative.

§

Att(_Att)

The Att syntax alternative.

§

AttEql(_AttEql)

The AttEql syntax alternative.

§

AttAtt(_AttAtt)

The AttAtt syntax alternative.

§

AttAttEql(_AttAttEql)

The AttAttEql syntax alternative.

§

AttAttQsm(_AttAttQsm)

The AttAttQsm syntax alternative.

§

AttAttQsmEql(_AttAttQsmEql)

The AttAttQsmEql syntax alternative.

§

HshQsm(_HshQsm)

The HshQsm syntax alternative.

§

Dot(_Dot)

The Dot syntax alternative.

§

DotQsm(_DotQsm)

The DotQsm syntax alternative.

§

CrtLst(_CrtLst)

The CrtLst syntax alternative.

§

CrtLstEql(_CrtLstEql)

The CrtLstEql syntax alternative.

§

CrtGst(_CrtGst)

The CrtGst syntax alternative.

§

CrtGstEql(_CrtGstEql)

The CrtGstEql syntax alternative.

§

UbsLst(_UbsLst)

The UbsLst syntax alternative.

§

UbsLstEql(_UbsLstEql)

The UbsLstEql syntax alternative.

§

UbsGst(_UbsGst)

The UbsGst syntax alternative.

§

UbsGstEql(_UbsGstEql)

The UbsGstEql syntax alternative.

§

Crt(_Crt)

The Crt syntax alternative.

§

CrtEql(_CrtEql)

The CrtEql syntax alternative.

§

CrtMulMul(_CrtMulMul)

The CrtMulMul syntax alternative.

§

CrtMulMulEql(_CrtMulMulEql)

The CrtMulMulEql syntax alternative.

§

Ubs(_Ubs)

The Ubs syntax alternative.

§

UbsEql(_UbsEql)

The UbsEql syntax alternative.

§

PipUbs(_PipUbs)

The PipUbs syntax alternative.

§

PipUbsEql(_PipUbsEql)

The PipUbsEql syntax alternative.

§

Hsh(_Hsh)

The Hsh syntax alternative.

Implementations§

Source§

impl BinaryOperator

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.

Examples found in repository?
examples/type_inference.rs (line 231)
227    fn visit_expr_op_bin_regular(&mut self, node: &'ast ExprOpBinRegular) {
228        visit::visit_expr_op_bin_regular(self, node);
229        let left = self.inferred(node.left_operand.as_ref());
230        let right = self.inferred(node.right_operand.as_ref());
231        let result = match node.operator.spelling() {
232            "==" | "!=" | "===" | "=!=" | "<" | "<=" | ">" | ">=" | "and" | "or" | "xor" => {
233                M2Class::Boolean
234            }
235            "+" | "-" | "*" | "%" | "//" => left.promoted_with(right),
236            // Exact division leaves the integers even when both operands are `ZZ`.
237            "/" => left.promoted_with(right).promoted_with(M2Class::QQ),
238            ".." | "..<" => M2Class::Sequence,
239            // Concatenation of two texts or two lists, bitwise `or` on integers.
240            "|" => left.join(right),
241            _ => M2Class::Thing,
242        };
243        self.record(node, result);
244    }

Trait Implementations§

Source§

impl Debug for BinaryOperator

Source§

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

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

impl From<_Add> for BinaryOperator

Source§

fn from(value: _Add) -> Self

Converts to this type from the input type.
Source§

impl From<_AddAdd> for BinaryOperator

Source§

fn from(value: _AddAdd) -> Self

Converts to this type from the input type.
Source§

impl From<_AddAddEql> for BinaryOperator

Source§

fn from(value: _AddAddEql) -> Self

Converts to this type from the input type.
Source§

impl From<_AddEql> for BinaryOperator

Source§

fn from(value: _AddEql) -> Self

Converts to this type from the input type.
Source§

impl From<_Amp> for BinaryOperator

Source§

fn from(value: _Amp) -> Self

Converts to this type from the input type.
Source§

impl From<_AmpEql> for BinaryOperator

Source§

fn from(value: _AmpEql) -> Self

Converts to this type from the input type.
Source§

impl From<_And> for BinaryOperator

Source§

fn from(value: _And) -> Self

Converts to this type from the input type.
Source§

impl From<_Att> for BinaryOperator

Source§

fn from(value: _Att) -> Self

Converts to this type from the input type.
Source§

impl From<_AttAtt> for BinaryOperator

Source§

fn from(value: _AttAtt) -> Self

Converts to this type from the input type.
Source§

impl From<_AttAttEql> for BinaryOperator

Source§

fn from(value: _AttAttEql) -> Self

Converts to this type from the input type.
Source§

impl From<_AttAttQsm> for BinaryOperator

Source§

fn from(value: _AttAttQsm) -> Self

Converts to this type from the input type.
Source§

impl From<_AttAttQsmEql> for BinaryOperator

Source§

fn from(value: _AttAttQsmEql) -> Self

Converts to this type from the input type.
Source§

impl From<_AttEql> for BinaryOperator

Source§

fn from(value: _AttEql) -> Self

Converts to this type from the input type.
Source§

impl From<_BngEql> for BinaryOperator

Source§

fn from(value: _BngEql) -> Self

Converts to this type from the input type.
Source§

impl From<_Box> for BinaryOperator

Source§

fn from(value: _Box) -> Self

Converts to this type from the input type.
Source§

impl From<_BoxEql> for BinaryOperator

Source§

fn from(value: _BoxEql) -> Self

Converts to this type from the input type.
Source§

impl From<_Bsl> for BinaryOperator

Source§

fn from(value: _Bsl) -> Self

Converts to this type from the input type.
Source§

impl From<_BslBsl> for BinaryOperator

Source§

fn from(value: _BslBsl) -> Self

Converts to this type from the input type.
Source§

impl From<_BslBslEql> for BinaryOperator

Source§

fn from(value: _BslBslEql) -> Self

Converts to this type from the input type.
Source§

impl From<_BslEql> for BinaryOperator

Source§

fn from(value: _BslEql) -> Self

Converts to this type from the input type.
Source§

impl From<_Cdt> for BinaryOperator

Source§

fn from(value: _Cdt) -> Self

Converts to this type from the input type.
Source§

impl From<_CdtEql> for BinaryOperator

Source§

fn from(value: _CdtEql) -> Self

Converts to this type from the input type.
Source§

impl From<_Col> for BinaryOperator

Source§

fn from(value: _Col) -> Self

Converts to this type from the input type.
Source§

impl From<_ColEql> for BinaryOperator

Source§

fn from(value: _ColEql) -> Self

Converts to this type from the input type.
Source§

impl From<_Crt> for BinaryOperator

Source§

fn from(value: _Crt) -> Self

Converts to this type from the input type.
Source§

impl From<_CrtCrt> for BinaryOperator

Source§

fn from(value: _CrtCrt) -> Self

Converts to this type from the input type.
Source§

impl From<_CrtCrtEql> for BinaryOperator

Source§

fn from(value: _CrtCrtEql) -> Self

Converts to this type from the input type.
Source§

impl From<_CrtEql> for BinaryOperator

Source§

fn from(value: _CrtEql) -> Self

Converts to this type from the input type.
Source§

impl From<_CrtGst> for BinaryOperator

Source§

fn from(value: _CrtGst) -> Self

Converts to this type from the input type.
Source§

impl From<_CrtGstEql> for BinaryOperator

Source§

fn from(value: _CrtGstEql) -> Self

Converts to this type from the input type.
Source§

impl From<_CrtLst> for BinaryOperator

Source§

fn from(value: _CrtLst) -> Self

Converts to this type from the input type.
Source§

impl From<_CrtLstEql> for BinaryOperator

Source§

fn from(value: _CrtLstEql) -> Self

Converts to this type from the input type.
Source§

impl From<_CrtMulMul> for BinaryOperator

Source§

fn from(value: _CrtMulMul) -> Self

Converts to this type from the input type.
Source§

impl From<_CrtMulMulEql> for BinaryOperator

Source§

fn from(value: _CrtMulMulEql) -> Self

Converts to this type from the input type.
Source§

impl From<_Dot> for BinaryOperator

Source§

fn from(value: _Dot) -> Self

Converts to this type from the input type.
Source§

impl From<_DotDot> for BinaryOperator

Source§

fn from(value: _DotDot) -> Self

Converts to this type from the input type.
Source§

impl From<_DotDotEql> for BinaryOperator

Source§

fn from(value: _DotDotEql) -> Self

Converts to this type from the input type.
Source§

impl From<_DotDotLst> for BinaryOperator

Source§

fn from(value: _DotDotLst) -> Self

Converts to this type from the input type.
Source§

impl From<_DotDotLstEql> for BinaryOperator

Source§

fn from(value: _DotDotLstEql) -> Self

Converts to this type from the input type.
Source§

impl From<_DotQsm> for BinaryOperator

Source§

fn from(value: _DotQsm) -> Self

Converts to this type from the input type.
Source§

impl From<_EqlBngEql> for BinaryOperator

Source§

fn from(value: _EqlBngEql) -> Self

Converts to this type from the input type.
Source§

impl From<_EqlEql> for BinaryOperator

Source§

fn from(value: _EqlEql) -> Self

Converts to this type from the input type.
Source§

impl From<_EqlEqlEql> for BinaryOperator

Source§

fn from(value: _EqlEqlEql) -> Self

Converts to this type from the input type.
Source§

impl From<_EqlEqlEqlGst> for BinaryOperator

Source§

fn from(value: _EqlEqlEqlGst) -> Self

Converts to this type from the input type.
Source§

impl From<_EqlEqlEqlGstEql> for BinaryOperator

Source§

fn from(value: _EqlEqlEqlGstEql) -> Self

Converts to this type from the input type.
Source§

impl From<_EqlEqlGst> for BinaryOperator

Source§

fn from(value: _EqlEqlGst) -> Self

Converts to this type from the input type.
Source§

impl From<_EqlEqlGstEql> for BinaryOperator

Source§

fn from(value: _EqlEqlGstEql) -> Self

Converts to this type from the input type.
Source§

impl From<_Gst> for BinaryOperator

Source§

fn from(value: _Gst) -> Self

Converts to this type from the input type.
Source§

impl From<_GstEql> for BinaryOperator

Source§

fn from(value: _GstEql) -> Self

Converts to this type from the input type.
Source§

impl From<_GstGst> for BinaryOperator

Source§

fn from(value: _GstGst) -> Self

Converts to this type from the input type.
Source§

impl From<_GstGstEql> for BinaryOperator

Source§

fn from(value: _GstGstEql) -> Self

Converts to this type from the input type.
Source§

impl From<_Hsh> for BinaryOperator

Source§

fn from(value: _Hsh) -> Self

Converts to this type from the input type.
Source§

impl From<_HshQsm> for BinaryOperator

Source§

fn from(value: _HshQsm) -> Self

Converts to this type from the input type.
Source§

impl From<_Lst> for BinaryOperator

Source§

fn from(value: _Lst) -> Self

Converts to this type from the input type.
Source§

impl From<_LstEql> for BinaryOperator

Source§

fn from(value: _LstEql) -> Self

Converts to this type from the input type.
Source§

impl From<_LstEqlEql> for BinaryOperator

Source§

fn from(value: _LstEqlEql) -> Self

Converts to this type from the input type.
Source§

impl From<_LstEqlEqlEql> for BinaryOperator

Source§

fn from(value: _LstEqlEqlEql) -> Self

Converts to this type from the input type.
Source§

impl From<_LstEqlEqlGst> for BinaryOperator

Source§

fn from(value: _LstEqlEqlGst) -> Self

Converts to this type from the input type.
Source§

impl From<_LstEqlEqlGstEql> for BinaryOperator

Source§

fn from(value: _LstEqlEqlGstEql) -> Self

Converts to this type from the input type.
Source§

impl From<_LstLst> for BinaryOperator

Source§

fn from(value: _LstLst) -> Self

Converts to this type from the input type.
Source§

impl From<_LstLstEql> for BinaryOperator

Source§

fn from(value: _LstLstEql) -> Self

Converts to this type from the input type.
Source§

impl From<_Mod> for BinaryOperator

Source§

fn from(value: _Mod) -> Self

Converts to this type from the input type.
Source§

impl From<_ModEql> for BinaryOperator

Source§

fn from(value: _ModEql) -> Self

Converts to this type from the input type.
Source§

impl From<_Mul> for BinaryOperator

Source§

fn from(value: _Mul) -> Self

Converts to this type from the input type.
Source§

impl From<_MulEql> for BinaryOperator

Source§

fn from(value: _MulEql) -> Self

Converts to this type from the input type.
Source§

impl From<_MulMul> for BinaryOperator

Source§

fn from(value: _MulMul) -> Self

Converts to this type from the input type.
Source§

impl From<_MulMulEql> for BinaryOperator

Source§

fn from(value: _MulMulEql) -> Self

Converts to this type from the input type.
Source§

impl From<_Or> for BinaryOperator

Source§

fn from(value: _Or) -> Self

Converts to this type from the input type.
Source§

impl From<_Pip> for BinaryOperator

Source§

fn from(value: _Pip) -> Self

Converts to this type from the input type.
Source§

impl From<_PipEql> for BinaryOperator

Source§

fn from(value: _PipEql) -> Self

Converts to this type from the input type.
Source§

impl From<_PipPip> for BinaryOperator

Source§

fn from(value: _PipPip) -> Self

Converts to this type from the input type.
Source§

impl From<_PipPipEql> for BinaryOperator

Source§

fn from(value: _PipPipEql) -> Self

Converts to this type from the input type.
Source§

impl From<_PipSub> for BinaryOperator

Source§

fn from(value: _PipSub) -> Self

Converts to this type from the input type.
Source§

impl From<_PipSubEql> for BinaryOperator

Source§

fn from(value: _PipSubEql) -> Self

Converts to this type from the input type.
Source§

impl From<_PipUbs> for BinaryOperator

Source§

fn from(value: _PipUbs) -> Self

Converts to this type from the input type.
Source§

impl From<_PipUbsEql> for BinaryOperator

Source§

fn from(value: _PipUbsEql) -> Self

Converts to this type from the input type.
Source§

impl From<_Qsm> for BinaryOperator

Source§

fn from(value: _Qsm) -> Self

Converts to this type from the input type.
Source§

impl From<_QsmQsm> for BinaryOperator

Source§

fn from(value: _QsmQsm) -> Self

Converts to this type from the input type.
Source§

impl From<_QsmQsmEql> for BinaryOperator

Source§

fn from(value: _QsmQsmEql) -> Self

Converts to this type from the input type.
Source§

impl From<_Sfp> for BinaryOperator

Source§

fn from(value: _Sfp) -> Self

Converts to this type from the input type.
Source§

impl From<_SfpEql> for BinaryOperator

Source§

fn from(value: _SfpEql) -> Self

Converts to this type from the input type.
Source§

impl From<_Slh> for BinaryOperator

Source§

fn from(value: _Slh) -> Self

Converts to this type from the input type.
Source§

impl From<_SlhEql> for BinaryOperator

Source§

fn from(value: _SlhEql) -> Self

Converts to this type from the input type.
Source§

impl From<_SlhSlh> for BinaryOperator

Source§

fn from(value: _SlhSlh) -> Self

Converts to this type from the input type.
Source§

impl From<_SlhSlhEql> for BinaryOperator

Source§

fn from(value: _SlhSlhEql) -> Self

Converts to this type from the input type.
Source§

impl From<_Sub> for BinaryOperator

Source§

fn from(value: _Sub) -> Self

Converts to this type from the input type.
Source§

impl From<_SubEql> for BinaryOperator

Source§

fn from(value: _SubEql) -> Self

Converts to this type from the input type.
Source§

impl From<_Tld> for BinaryOperator

Source§

fn from(value: _Tld) -> Self

Converts to this type from the input type.
Source§

impl From<_TldEql> for BinaryOperator

Source§

fn from(value: _TldEql) -> Self

Converts to this type from the input type.
Source§

impl From<_Ubs> for BinaryOperator

Source§

fn from(value: _Ubs) -> Self

Converts to this type from the input type.
Source§

impl From<_UbsEql> for BinaryOperator

Source§

fn from(value: _UbsEql) -> Self

Converts to this type from the input type.
Source§

impl From<_UbsGst> for BinaryOperator

Source§

fn from(value: _UbsGst) -> Self

Converts to this type from the input type.
Source§

impl From<_UbsGstEql> for BinaryOperator

Source§

fn from(value: _UbsGstEql) -> Self

Converts to this type from the input type.
Source§

impl From<_UbsLst> for BinaryOperator

Source§

fn from(value: _UbsLst) -> Self

Converts to this type from the input type.
Source§

impl From<_UbsLstEql> for BinaryOperator

Source§

fn from(value: _UbsLstEql) -> Self

Converts to this type from the input type.
Source§

impl From<_Xor> for BinaryOperator

Source§

fn from(value: _Xor) -> Self

Converts to this type from the input type.
Source§

impl Lex for BinaryOperator

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

Source§

fn pretty_tree(&self) -> PrettyNode

Builds the presentation node for this syntax value.
Source§

impl Spanned for BinaryOperator

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

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.