Struct quil_rs::instruction::MemoryReference
source · pub struct MemoryReference {
pub name: String,
pub index: u64,
}
Fields§
§name: String
§index: u64
Implementations§
Trait Implementations§
source§impl Clone for MemoryReference
impl Clone for MemoryReference
source§fn clone(&self) -> MemoryReference
fn clone(&self) -> MemoryReference
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 MemoryReference
impl Debug for MemoryReference
source§impl Display for MemoryReference
impl Display for MemoryReference
source§impl FromStr for MemoryReference
impl FromStr for MemoryReference
source§impl Hash for MemoryReference
impl Hash for MemoryReference
source§impl Ord for MemoryReference
impl Ord for MemoryReference
source§fn cmp(&self, other: &MemoryReference) -> Ordering
fn cmp(&self, other: &MemoryReference) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq<MemoryReference> for MemoryReference
impl PartialEq<MemoryReference> for MemoryReference
source§fn eq(&self, other: &MemoryReference) -> bool
fn eq(&self, other: &MemoryReference) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd<MemoryReference> for MemoryReference
impl PartialOrd<MemoryReference> for MemoryReference
source§fn partial_cmp(&self, other: &MemoryReference) -> Option<Ordering>
fn partial_cmp(&self, other: &MemoryReference) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl Quil for MemoryReference
impl Quil for MemoryReference
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 Eq for MemoryReference
impl StructuralEq for MemoryReference
impl StructuralPartialEq for MemoryReference
Auto Trait Implementations§
impl RefUnwindSafe for MemoryReference
impl Send for MemoryReference
impl Sync for MemoryReference
impl Unpin for MemoryReference
impl UnwindSafe for MemoryReference
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<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.