Struct quil_rs::instruction::Arithmetic
source · pub struct Arithmetic {
pub operator: ArithmeticOperator,
pub destination: ArithmeticOperand,
pub source: ArithmeticOperand,
}
Fields§
§operator: ArithmeticOperator
§destination: ArithmeticOperand
§source: ArithmeticOperand
Implementations§
source§impl Arithmetic
impl Arithmetic
pub fn new( operator: ArithmeticOperator, destination: ArithmeticOperand, source: ArithmeticOperand ) -> Self
Trait Implementations§
source§impl Clone for Arithmetic
impl Clone for Arithmetic
source§fn clone(&self) -> Arithmetic
fn clone(&self) -> Arithmetic
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 Debug for Arithmetic
impl Debug for Arithmetic
source§impl Hash for Arithmetic
impl Hash for Arithmetic
source§impl PartialEq<Arithmetic> for Arithmetic
impl PartialEq<Arithmetic> for Arithmetic
source§fn eq(&self, other: &Arithmetic) -> bool
fn eq(&self, other: &Arithmetic) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Quil for Arithmetic
impl Quil for Arithmetic
source§fn write(
&self,
f: &mut impl Write,
fall_back_to_debug: bool
) -> ToQuilResult<()>
fn write( &self, f: &mut impl Write, fall_back_to_debug: bool ) -> ToQuilResult<()>
Write the Quil representation of the item to the given writer. If
fall_back_to_debug
is true
, then it must not return an error.source§fn to_quil(&self) -> Result<String, ToQuilError>
fn to_quil(&self) -> Result<String, ToQuilError>
Return a string in valid Quil syntax or an error if the item cannot be represented with valid Quil.
source§fn to_quil_or_debug(&self) -> String
fn to_quil_or_debug(&self) -> String
Return a string in valid Quil syntax if possible. Any individual component of this object
which cannot be represented in Quil will be replaced with a
Debug
representation of that
component.impl StructuralPartialEq for Arithmetic
Auto Trait Implementations§
impl RefUnwindSafe for Arithmetic
impl Send for Arithmetic
impl Sync for Arithmetic
impl Unpin for Arithmetic
impl UnwindSafe for Arithmetic
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