Struct cairo_vm::types::relocatable::Relocatable
source · Fields§
§segment_index: isize§offset: usizeImplementations§
source§impl Relocatable
impl Relocatable
pub fn sub_usize(&self, other: usize) -> Result<Self, VirtualMachineError>
sourcepub fn add_int(&self, other: &Felt) -> Result<Relocatable, VirtualMachineError>
pub fn add_int(&self, other: &Felt) -> Result<Relocatable, VirtualMachineError>
Adds a Felt to self
sourcepub fn add_maybe(
&self,
other: &MaybeRelocatable
) -> Result<Relocatable, VirtualMachineError>
pub fn add_maybe(
&self,
other: &MaybeRelocatable
) -> Result<Relocatable, VirtualMachineError>
Adds a MaybeRelocatable to self Cant add two relocatable values
pub fn sub(&self, other: &Self) -> Result<usize, VirtualMachineError>
Trait Implementations§
source§impl Add<i32> for &Relocatable
impl Add<i32> for &Relocatable
§type Output = Relocatable
type Output = Relocatable
The resulting type after applying the
+ operator.source§impl Add<i32> for Relocatable
impl Add<i32> for Relocatable
source§impl<'a> Add<usize> for &'a Relocatable
impl<'a> Add<usize> for &'a Relocatable
source§impl Add<usize> for Relocatable
impl Add<usize> for Relocatable
source§impl Clone for Relocatable
impl Clone for Relocatable
source§fn clone(&self) -> Relocatable
fn clone(&self) -> Relocatable
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 Relocatable
impl Debug for Relocatable
source§impl<'de> Deserialize<'de> for Relocatable
impl<'de> Deserialize<'de> for Relocatable
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Display for Relocatable
impl Display for Relocatable
source§impl From<&Relocatable> for MaybeRelocatable
impl From<&Relocatable> for MaybeRelocatable
source§fn from(rel: &Relocatable) -> Self
fn from(rel: &Relocatable) -> Self
Converts to this type from the input type.
source§impl From<&Relocatable> for Relocatable
impl From<&Relocatable> for Relocatable
source§fn from(other: &Relocatable) -> Self
fn from(other: &Relocatable) -> Self
Converts to this type from the input type.
source§impl From<Relocatable> for MaybeRelocatable
impl From<Relocatable> for MaybeRelocatable
source§fn from(rel: Relocatable) -> Self
fn from(rel: Relocatable) -> Self
Converts to this type from the input type.
source§impl Hash for Relocatable
impl Hash for Relocatable
source§impl PartialEq<Relocatable> for Relocatable
impl PartialEq<Relocatable> for Relocatable
source§fn eq(&self, other: &Relocatable) -> bool
fn eq(&self, other: &Relocatable) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl PartialOrd<Relocatable> for Relocatable
impl PartialOrd<Relocatable> for Relocatable
source§fn partial_cmp(&self, other: &Relocatable) -> Option<Ordering>
fn partial_cmp(&self, other: &Relocatable) -> 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 Serialize for Relocatable
impl Serialize for Relocatable
source§impl TryFrom<&MaybeRelocatable> for Relocatable
impl TryFrom<&MaybeRelocatable> for Relocatable
§type Error = MemoryError
type Error = MemoryError
The type returned in the event of a conversion error.
source§fn try_from(other: &MaybeRelocatable) -> Result<Self, MemoryError>
fn try_from(other: &MaybeRelocatable) -> Result<Self, MemoryError>
Performs the conversion.
source§impl TryInto<Relocatable> for MaybeRelocatable
impl TryInto<Relocatable> for MaybeRelocatable
§type Error = MemoryError
type Error = MemoryError
The type returned in the event of a conversion error.
source§fn try_into(self) -> Result<Relocatable, MemoryError>
fn try_into(self) -> Result<Relocatable, MemoryError>
Performs the conversion.
impl Copy for Relocatable
impl Eq for Relocatable
impl StructuralEq for Relocatable
impl StructuralPartialEq for Relocatable
Auto Trait Implementations§
impl RefUnwindSafe for Relocatable
impl Send for Relocatable
impl Sync for Relocatable
impl Unpin for Relocatable
impl UnwindSafe for Relocatable
Blanket Implementations§
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.