Enum move_stackless_bytecode::access_path::Addr
source · [−]pub enum Addr {
Constant(BigUint),
Footprint(AccessPath),
}
Expand description
Building block for abstraction of addresses
Variants
Constant(BigUint)
Account address constant
Footprint(AccessPath)
Account address read from given access path. This represents the value read from the given path at the beginning of the current function
Implementations
sourceimpl Addr
impl Addr
sourcepub fn footprint(ap: AccessPath) -> Self
pub fn footprint(ap: AccessPath) -> Self
Create a footprint address from access path ap
sourcepub fn is_constant(&self) -> bool
pub fn is_constant(&self) -> bool
Return true
if self
is a constant
sourcepub fn add_struct_offset(
self,
mid: &ModuleId,
sid: StructId,
types: Vec<Type>
) -> AccessPath
pub fn add_struct_offset(
self,
mid: &ModuleId,
sid: StructId,
types: Vec<Type>
) -> AccessPath
Convert this address-typed abstract value A into an access path A/mid::sid::types
sourcepub fn get_concrete_address(&self) -> Option<AccountAddress>
pub fn get_concrete_address(&self) -> Option<AccountAddress>
Convert self
into a concrete AccountAddress
if it is a constant. Returns None
otherwise.
sourcepub fn display<'a>(&'a self, env: &'a FunctionEnv<'_>) -> AddrDisplay<'a>
pub fn display<'a>(&'a self, env: &'a FunctionEnv<'_>) -> AddrDisplay<'a>
Return a wrapper of self
that implements Display
using env
Trait Implementations
sourceimpl Ord for Addr
impl Ord for Addr
1.21.0 · sourcefn max(self, other: Self) -> Self
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
1.21.0 · sourcefn min(self, other: Self) -> Self
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Self where
Self: PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Self where
Self: PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl PartialEq<Addr> for Addr
impl PartialEq<Addr> for Addr
sourceimpl PartialOrd<Addr> for Addr
impl PartialOrd<Addr> for Addr
sourcefn partial_cmp(&self, other: &Addr) -> Option<Ordering>
fn partial_cmp(&self, other: &Addr) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn 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 more
impl Eq for Addr
impl StructuralEq for Addr
impl StructuralPartialEq for Addr
Auto Trait Implementations
impl RefUnwindSafe for Addr
impl Send for Addr
impl Sync for Addr
impl Unpin for Addr
impl UnwindSafe for Addr
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to key
and return true
if they are equal.