Enum llvm_ir::instruction::groups::BinaryOp

source ·
pub enum BinaryOp {
Show 18 variants Add(Add), Sub(Sub), Mul(Mul), UDiv(UDiv), SDiv(SDiv), URem(URem), SRem(SRem), And(And), Or(Or), Xor(Xor), Shl(Shl), LShr(LShr), AShr(AShr), FAdd(FAdd), FSub(FSub), FMul(FMul), FDiv(FDiv), FRem(FRem),
}
Expand description

Just the BinaryOps. This ends up being better than a &dyn BinaryOp for various reasons.

Variants§

§

Add(Add)

§

Sub(Sub)

§

Mul(Mul)

§

UDiv(UDiv)

§

SDiv(SDiv)

§

URem(URem)

§

SRem(SRem)

§

And(And)

§

Or(Or)

§

Xor(Xor)

§

Shl(Shl)

§

LShr(LShr)

§

AShr(AShr)

§

FAdd(FAdd)

§

FSub(FSub)

§

FMul(FMul)

§

FDiv(FDiv)

§

FRem(FRem)

Trait Implementations§

source§

impl BinaryOp for BinaryOp

source§

impl Clone for BinaryOp

source§

fn clone(&self) -> BinaryOp

Returns a copy 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 BinaryOp

source§

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

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

impl From<AShr> for BinaryOp

source§

fn from(inst: AShr) -> Self

Converts to this type from the input type.
source§

impl From<Add> for BinaryOp

source§

fn from(inst: Add) -> Self

Converts to this type from the input type.
source§

impl From<And> for BinaryOp

source§

fn from(inst: And) -> Self

Converts to this type from the input type.
source§

impl From<BinaryOp> for Instruction

source§

fn from(bo: BinaryOp) -> Instruction

Converts to this type from the input type.
source§

impl From<FAdd> for BinaryOp

source§

fn from(inst: FAdd) -> Self

Converts to this type from the input type.
source§

impl From<FDiv> for BinaryOp

source§

fn from(inst: FDiv) -> Self

Converts to this type from the input type.
source§

impl From<FMul> for BinaryOp

source§

fn from(inst: FMul) -> Self

Converts to this type from the input type.
source§

impl From<FRem> for BinaryOp

source§

fn from(inst: FRem) -> Self

Converts to this type from the input type.
source§

impl From<FSub> for BinaryOp

source§

fn from(inst: FSub) -> Self

Converts to this type from the input type.
source§

impl From<LShr> for BinaryOp

source§

fn from(inst: LShr) -> Self

Converts to this type from the input type.
source§

impl From<Mul> for BinaryOp

source§

fn from(inst: Mul) -> Self

Converts to this type from the input type.
source§

impl From<Or> for BinaryOp

source§

fn from(inst: Or) -> Self

Converts to this type from the input type.
source§

impl From<SDiv> for BinaryOp

source§

fn from(inst: SDiv) -> Self

Converts to this type from the input type.
source§

impl From<SRem> for BinaryOp

source§

fn from(inst: SRem) -> Self

Converts to this type from the input type.
source§

impl From<Shl> for BinaryOp

source§

fn from(inst: Shl) -> Self

Converts to this type from the input type.
source§

impl From<Sub> for BinaryOp

source§

fn from(inst: Sub) -> Self

Converts to this type from the input type.
source§

impl From<UDiv> for BinaryOp

source§

fn from(inst: UDiv) -> Self

Converts to this type from the input type.
source§

impl From<URem> for BinaryOp

source§

fn from(inst: URem) -> Self

Converts to this type from the input type.
source§

impl From<Xor> for BinaryOp

source§

fn from(inst: Xor) -> Self

Converts to this type from the input type.
source§

impl HasResult for BinaryOp

source§

fn get_result(&self) -> &Name

source§

impl PartialEq for BinaryOp

source§

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

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl TryFrom<BinaryOp> for AShr

§

type Error = &'static str

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

fn try_from(bo: BinaryOp) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<BinaryOp> for Add

§

type Error = &'static str

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

fn try_from(bo: BinaryOp) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<BinaryOp> for And

§

type Error = &'static str

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

fn try_from(bo: BinaryOp) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<BinaryOp> for FAdd

§

type Error = &'static str

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

fn try_from(bo: BinaryOp) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<BinaryOp> for FDiv

§

type Error = &'static str

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

fn try_from(bo: BinaryOp) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<BinaryOp> for FMul

§

type Error = &'static str

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

fn try_from(bo: BinaryOp) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<BinaryOp> for FRem

§

type Error = &'static str

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

fn try_from(bo: BinaryOp) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<BinaryOp> for FSub

§

type Error = &'static str

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

fn try_from(bo: BinaryOp) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<BinaryOp> for LShr

§

type Error = &'static str

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

fn try_from(bo: BinaryOp) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<BinaryOp> for Mul

§

type Error = &'static str

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

fn try_from(bo: BinaryOp) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<BinaryOp> for Or

§

type Error = &'static str

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

fn try_from(bo: BinaryOp) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<BinaryOp> for SDiv

§

type Error = &'static str

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

fn try_from(bo: BinaryOp) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<BinaryOp> for SRem

§

type Error = &'static str

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

fn try_from(bo: BinaryOp) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<BinaryOp> for Shl

§

type Error = &'static str

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

fn try_from(bo: BinaryOp) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<BinaryOp> for Sub

§

type Error = &'static str

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

fn try_from(bo: BinaryOp) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<BinaryOp> for UDiv

§

type Error = &'static str

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

fn try_from(bo: BinaryOp) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<BinaryOp> for URem

§

type Error = &'static str

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

fn try_from(bo: BinaryOp) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<BinaryOp> for Xor

§

type Error = &'static str

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

fn try_from(bo: BinaryOp) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Instruction> for BinaryOp

§

type Error = &'static str

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

fn try_from(inst: Instruction) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl Typed for BinaryOp

source§

fn get_type(&self, types: &Types) -> TypeRef

source§

impl StructuralPartialEq for BinaryOp

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> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
source§

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

§

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

§

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

§

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.