Struct arithmetic_typing::arith::BinaryOpContext
source · pub struct BinaryOpContext<Prim: PrimitiveType> {
pub op: BinaryOp,
pub lhs: Type<Prim>,
pub rhs: Type<Prim>,
}
Expand description
Code spans related to a binary operation.
Used in TypeArithmetic::process_binary_op()
.
Fields§
§op: BinaryOp
Binary operation.
lhs: Type<Prim>
Spanned left-hand side.
rhs: Type<Prim>
Spanned right-hand side.
Trait Implementations§
source§impl<Prim: Clone + PrimitiveType> Clone for BinaryOpContext<Prim>
impl<Prim: Clone + PrimitiveType> Clone for BinaryOpContext<Prim>
source§fn clone(&self) -> BinaryOpContext<Prim>
fn clone(&self) -> BinaryOpContext<Prim>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<Prim: Debug + PrimitiveType> Debug for BinaryOpContext<Prim>
impl<Prim: Debug + PrimitiveType> Debug for BinaryOpContext<Prim>
source§impl<Prim: PrimitiveType> From<BinaryOpContext<Prim>> for ErrorContext<Prim>
impl<Prim: PrimitiveType> From<BinaryOpContext<Prim>> for ErrorContext<Prim>
source§fn from(value: BinaryOpContext<Prim>) -> Self
fn from(value: BinaryOpContext<Prim>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<Prim> Freeze for BinaryOpContext<Prim>where
Prim: Freeze,
impl<Prim> !RefUnwindSafe for BinaryOpContext<Prim>
impl<Prim> Send for BinaryOpContext<Prim>
impl<Prim> Sync for BinaryOpContext<Prim>
impl<Prim> Unpin for BinaryOpContext<Prim>where
Prim: Unpin,
impl<Prim> !UnwindSafe for BinaryOpContext<Prim>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)