Struct bus_mapping::operation::MemoryAddress
source · pub struct MemoryAddress(pub usize);
Expand description
Represents a MemoryAddress
of the EVM.
Tuple Fields§
§0: usize
Implementations§
source§impl MemoryAddress
impl MemoryAddress
sourcepub const fn zero() -> MemoryAddress
pub const fn zero() -> MemoryAddress
Returns the zero address for Memory targets.
sourcepub fn to_le_bytes(self) -> [u8; 32]
pub fn to_le_bytes(self) -> [u8; 32]
Return the little-endian byte representation of the word as a 32-byte array.
sourcepub fn to_be_bytes(self) -> [u8; 32]
pub fn to_be_bytes(self) -> [u8; 32]
Return the big-endian byte representation of the word as a 32-byte array.
sourcepub fn from_le_bytes<T>(bytes: T) -> Result<MemoryAddress, Error>
pub fn from_le_bytes<T>(bytes: T) -> Result<MemoryAddress, Error>
Generate a MemoryAddress from the provided set of little-endian bytes.
sourcepub fn from_be_bytes<T>(bytes: T) -> Result<MemoryAddress, Error>
pub fn from_be_bytes<T>(bytes: T) -> Result<MemoryAddress, Error>
Generate a MemoryAddress from the provided set of big-endian bytes.
Trait Implementations§
source§impl Add<&MemoryAddress> for &MemoryAddress
impl Add<&MemoryAddress> for &MemoryAddress
§type Output = MemoryAddress
type Output = MemoryAddress
The resulting type after applying the
+
operator.source§fn add(
self,
rhs: &MemoryAddress
) -> <&MemoryAddress as Add<&MemoryAddress>>::Output
fn add( self, rhs: &MemoryAddress ) -> <&MemoryAddress as Add<&MemoryAddress>>::Output
Performs the
+
operation. Read moresource§impl<'b> Add<&'b MemoryAddress> for MemoryAddress
impl<'b> Add<&'b MemoryAddress> for MemoryAddress
§type Output = MemoryAddress
type Output = MemoryAddress
The resulting type after applying the
+
operator.source§fn add(self, rhs: &'b MemoryAddress) -> MemoryAddress
fn add(self, rhs: &'b MemoryAddress) -> MemoryAddress
Performs the
+
operation. Read moresource§impl<'a> Add<MemoryAddress> for &'a MemoryAddress
impl<'a> Add<MemoryAddress> for &'a MemoryAddress
§type Output = MemoryAddress
type Output = MemoryAddress
The resulting type after applying the
+
operator.source§fn add(self, rhs: MemoryAddress) -> MemoryAddress
fn add(self, rhs: MemoryAddress) -> MemoryAddress
Performs the
+
operation. Read moresource§impl Add for MemoryAddress
impl Add for MemoryAddress
§type Output = MemoryAddress
type Output = MemoryAddress
The resulting type after applying the
+
operator.source§fn add(self, rhs: MemoryAddress) -> MemoryAddress
fn add(self, rhs: MemoryAddress) -> MemoryAddress
Performs the
+
operation. Read moresource§impl<'b> AddAssign<&'b MemoryAddress> for MemoryAddress
impl<'b> AddAssign<&'b MemoryAddress> for MemoryAddress
source§fn add_assign(&mut self, _rhs: &'b MemoryAddress)
fn add_assign(&mut self, _rhs: &'b MemoryAddress)
Performs the
+=
operation. Read moresource§impl AddAssign for MemoryAddress
impl AddAssign for MemoryAddress
source§fn add_assign(&mut self, rhs: MemoryAddress)
fn add_assign(&mut self, rhs: MemoryAddress)
Performs the
+=
operation. Read moresource§impl Clone for MemoryAddress
impl Clone for MemoryAddress
source§fn clone(&self) -> MemoryAddress
fn clone(&self) -> MemoryAddress
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 MemoryAddress
impl Debug for MemoryAddress
source§impl From<i32> for MemoryAddress
impl From<i32> for MemoryAddress
source§fn from(item: i32) -> MemoryAddress
fn from(item: i32) -> MemoryAddress
Converts to this type from the input type.
source§impl From<i64> for MemoryAddress
impl From<i64> for MemoryAddress
source§fn from(item: i64) -> MemoryAddress
fn from(item: i64) -> MemoryAddress
Converts to this type from the input type.
source§impl From<u16> for MemoryAddress
impl From<u16> for MemoryAddress
source§fn from(item: u16) -> MemoryAddress
fn from(item: u16) -> MemoryAddress
Converts to this type from the input type.
source§impl From<u32> for MemoryAddress
impl From<u32> for MemoryAddress
source§fn from(item: u32) -> MemoryAddress
fn from(item: u32) -> MemoryAddress
Converts to this type from the input type.
source§impl From<u64> for MemoryAddress
impl From<u64> for MemoryAddress
source§fn from(item: u64) -> MemoryAddress
fn from(item: u64) -> MemoryAddress
Converts to this type from the input type.
source§impl From<u8> for MemoryAddress
impl From<u8> for MemoryAddress
source§fn from(item: u8) -> MemoryAddress
fn from(item: u8) -> MemoryAddress
Converts to this type from the input type.
source§impl From<usize> for MemoryAddress
impl From<usize> for MemoryAddress
source§fn from(item: usize) -> MemoryAddress
fn from(item: usize) -> MemoryAddress
Converts to this type from the input type.
source§impl FromStr for MemoryAddress
impl FromStr for MemoryAddress
source§impl Mul<&MemoryAddress> for &MemoryAddress
impl Mul<&MemoryAddress> for &MemoryAddress
§type Output = MemoryAddress
type Output = MemoryAddress
The resulting type after applying the
*
operator.source§fn mul(
self,
rhs: &MemoryAddress
) -> <&MemoryAddress as Mul<&MemoryAddress>>::Output
fn mul( self, rhs: &MemoryAddress ) -> <&MemoryAddress as Mul<&MemoryAddress>>::Output
Performs the
*
operation. Read moresource§impl<'b> Mul<&'b MemoryAddress> for MemoryAddress
impl<'b> Mul<&'b MemoryAddress> for MemoryAddress
§type Output = MemoryAddress
type Output = MemoryAddress
The resulting type after applying the
*
operator.source§fn mul(self, rhs: &'b MemoryAddress) -> MemoryAddress
fn mul(self, rhs: &'b MemoryAddress) -> MemoryAddress
Performs the
*
operation. Read moresource§impl<'a> Mul<MemoryAddress> for &'a MemoryAddress
impl<'a> Mul<MemoryAddress> for &'a MemoryAddress
§type Output = MemoryAddress
type Output = MemoryAddress
The resulting type after applying the
*
operator.source§fn mul(self, rhs: MemoryAddress) -> MemoryAddress
fn mul(self, rhs: MemoryAddress) -> MemoryAddress
Performs the
*
operation. Read moresource§impl Mul for MemoryAddress
impl Mul for MemoryAddress
§type Output = MemoryAddress
type Output = MemoryAddress
The resulting type after applying the
*
operator.source§fn mul(self, rhs: MemoryAddress) -> MemoryAddress
fn mul(self, rhs: MemoryAddress) -> MemoryAddress
Performs the
*
operation. Read moresource§impl<'b> MulAssign<&'b MemoryAddress> for MemoryAddress
impl<'b> MulAssign<&'b MemoryAddress> for MemoryAddress
source§fn mul_assign(&mut self, _rhs: &'b MemoryAddress)
fn mul_assign(&mut self, _rhs: &'b MemoryAddress)
Performs the
*=
operation. Read moresource§impl MulAssign for MemoryAddress
impl MulAssign for MemoryAddress
source§fn mul_assign(&mut self, rhs: MemoryAddress)
fn mul_assign(&mut self, rhs: MemoryAddress)
Performs the
*=
operation. Read moresource§impl Ord for MemoryAddress
impl Ord for MemoryAddress
source§fn cmp(&self, other: &MemoryAddress) -> Ordering
fn cmp(&self, other: &MemoryAddress) -> 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 for MemoryAddress
impl PartialEq for MemoryAddress
source§fn eq(&self, other: &MemoryAddress) -> bool
fn eq(&self, other: &MemoryAddress) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for MemoryAddress
impl PartialOrd for MemoryAddress
source§fn partial_cmp(&self, other: &MemoryAddress) -> Option<Ordering>
fn partial_cmp(&self, other: &MemoryAddress) -> 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 Sub<&MemoryAddress> for &MemoryAddress
impl Sub<&MemoryAddress> for &MemoryAddress
§type Output = MemoryAddress
type Output = MemoryAddress
The resulting type after applying the
-
operator.source§fn sub(
self,
rhs: &MemoryAddress
) -> <&MemoryAddress as Sub<&MemoryAddress>>::Output
fn sub( self, rhs: &MemoryAddress ) -> <&MemoryAddress as Sub<&MemoryAddress>>::Output
Performs the
-
operation. Read moresource§impl<'b> Sub<&'b MemoryAddress> for MemoryAddress
impl<'b> Sub<&'b MemoryAddress> for MemoryAddress
§type Output = MemoryAddress
type Output = MemoryAddress
The resulting type after applying the
-
operator.source§fn sub(self, rhs: &'b MemoryAddress) -> MemoryAddress
fn sub(self, rhs: &'b MemoryAddress) -> MemoryAddress
Performs the
-
operation. Read moresource§impl<'a> Sub<MemoryAddress> for &'a MemoryAddress
impl<'a> Sub<MemoryAddress> for &'a MemoryAddress
§type Output = MemoryAddress
type Output = MemoryAddress
The resulting type after applying the
-
operator.source§fn sub(self, rhs: MemoryAddress) -> MemoryAddress
fn sub(self, rhs: MemoryAddress) -> MemoryAddress
Performs the
-
operation. Read moresource§impl Sub for MemoryAddress
impl Sub for MemoryAddress
§type Output = MemoryAddress
type Output = MemoryAddress
The resulting type after applying the
-
operator.source§fn sub(self, rhs: MemoryAddress) -> MemoryAddress
fn sub(self, rhs: MemoryAddress) -> MemoryAddress
Performs the
-
operation. Read moresource§impl<'b> SubAssign<&'b MemoryAddress> for MemoryAddress
impl<'b> SubAssign<&'b MemoryAddress> for MemoryAddress
source§fn sub_assign(&mut self, _rhs: &'b MemoryAddress)
fn sub_assign(&mut self, _rhs: &'b MemoryAddress)
Performs the
-=
operation. Read moresource§impl SubAssign for MemoryAddress
impl SubAssign for MemoryAddress
source§fn sub_assign(&mut self, rhs: MemoryAddress)
fn sub_assign(&mut self, rhs: MemoryAddress)
Performs the
-=
operation. Read moresource§impl TryFrom<U256> for MemoryAddress
impl TryFrom<U256> for MemoryAddress
impl Copy for MemoryAddress
impl Eq for MemoryAddress
impl StructuralPartialEq for MemoryAddress
Auto Trait Implementations§
impl RefUnwindSafe for MemoryAddress
impl Send for MemoryAddress
impl Sync for MemoryAddress
impl Unpin for MemoryAddress
impl UnwindSafe for MemoryAddress
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
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<T> Conv for T
impl<T> Conv for T
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.§impl<T> FmtForward for T
impl<T> FmtForward for T
§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
Causes
self
to use its Binary
implementation when Debug
-formatted.§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
Causes
self
to use its Display
implementation when
Debug
-formatted.§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
Causes
self
to use its LowerExp
implementation when
Debug
-formatted.§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
Causes
self
to use its LowerHex
implementation when
Debug
-formatted.§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
Causes
self
to use its Octal
implementation when Debug
-formatted.§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
Causes
self
to use its Pointer
implementation when
Debug
-formatted.§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
Causes
self
to use its UpperExp
implementation when
Debug
-formatted.§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
Causes
self
to use its UpperHex
implementation when
Debug
-formatted.§fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
Formats each item in a sequence. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
Pipes by value. This is generally the method you want to use. Read more
§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
Borrows
self
and passes that borrow into the pipe function. Read more§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
Mutably borrows
self
and passes that borrow into the pipe function. Read more§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R ) -> R
§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
Borrows
self
, then passes self.as_ref()
into the pipe function.§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
Mutably borrows
self
, then passes self.as_mut()
into the pipe
function.§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
Borrows
self
, then passes self.deref()
into the pipe function.§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> Tap for T
impl<T> Tap for T
§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Immutable access to the
Borrow<B>
of a value. Read more§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
Mutable access to the
BorrowMut<B>
of a value. Read more§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
Immutable access to the
AsRef<R>
view of a value. Read more§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
Mutable access to the
AsMut<R>
view of a value. Read more§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Immutable access to the
Deref::Target
of a value. Read more§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Mutable access to the
Deref::Target
of a value. Read more§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
Calls
.tap()
only in debug builds, and is erased in release builds.§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
Calls
.tap_mut()
only in debug builds, and is erased in release
builds.§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
Calls
.tap_borrow()
only in debug builds, and is erased in release
builds.§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
Calls
.tap_borrow_mut()
only in debug builds, and is erased in release
builds.§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
Calls
.tap_ref()
only in debug builds, and is erased in release
builds.§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
Calls
.tap_ref_mut()
only in debug builds, and is erased in release
builds.§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
Calls
.tap_deref()
only in debug builds, and is erased in release
builds.