Struct quil_rs::instruction::Comparison
source · pub struct Comparison {
pub operator: ComparisonOperator,
pub operands: (MemoryReference, MemoryReference, ComparisonOperand),
}
Fields§
§operator: ComparisonOperator
§operands: (MemoryReference, MemoryReference, ComparisonOperand)
Implementations§
source§impl Comparison
impl Comparison
pub fn new( operator: ComparisonOperator, operands: (MemoryReference, MemoryReference, ComparisonOperand) ) -> Self
Trait Implementations§
source§impl Clone for Comparison
impl Clone for Comparison
source§fn clone(&self) -> Comparison
fn clone(&self) -> Comparison
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 Comparison
impl Debug for Comparison
source§impl Hash for Comparison
impl Hash for Comparison
source§impl PartialEq<Comparison> for Comparison
impl PartialEq<Comparison> for Comparison
source§fn eq(&self, other: &Comparison) -> bool
fn eq(&self, other: &Comparison) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Quil for Comparison
impl Quil for Comparison
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 Comparison
Auto Trait Implementations§
impl RefUnwindSafe for Comparison
impl Send for Comparison
impl Sync for Comparison
impl Unpin for Comparison
impl UnwindSafe for Comparison
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