Struct anychain_ethereum::amount::EthereumAmount
source · pub struct EthereumAmount(pub U256);Expand description
Represents the amount of Ethereum in wei
Tuple Fields§
§0: U256Implementations§
source§impl EthereumAmount
impl EthereumAmount
pub fn u256_from_str(val: &str) -> Result<U256, AmountError>
pub fn from_u256(wei: U256) -> Self
pub fn from_wei(wei_value: &str) -> Result<Self, AmountError>
pub fn from_kwei(kwei_value: &str) -> Result<Self, AmountError>
pub fn from_mwei(mwei_value: &str) -> Result<Self, AmountError>
pub fn from_gwei(gwei_value: &str) -> Result<Self, AmountError>
pub fn from_szabo(szabo_value: &str) -> Result<Self, AmountError>
pub fn from_finney(finney_value: &str) -> Result<Self, AmountError>
pub fn from_eth(eth_value: &str) -> Result<Self, AmountError>
Trait Implementations§
source§impl Add for EthereumAmount
impl Add for EthereumAmount
source§impl Clone for EthereumAmount
impl Clone for EthereumAmount
source§fn clone(&self) -> EthereumAmount
fn clone(&self) -> EthereumAmount
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 EthereumAmount
impl Debug for EthereumAmount
source§impl<'de> Deserialize<'de> for EthereumAmount
impl<'de> Deserialize<'de> for EthereumAmount
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 EthereumAmount
impl Display for EthereumAmount
source§impl Hash for EthereumAmount
impl Hash for EthereumAmount
source§impl Ord for EthereumAmount
impl Ord for EthereumAmount
source§fn cmp(&self, other: &EthereumAmount) -> Ordering
fn cmp(&self, other: &EthereumAmount) -> 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 EthereumAmount
impl PartialEq for EthereumAmount
source§fn eq(&self, other: &EthereumAmount) -> bool
fn eq(&self, other: &EthereumAmount) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl PartialOrd for EthereumAmount
impl PartialOrd for EthereumAmount
source§fn partial_cmp(&self, other: &EthereumAmount) -> Option<Ordering>
fn partial_cmp(&self, other: &EthereumAmount) -> 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 EthereumAmount
impl Serialize for EthereumAmount
source§impl Sub for EthereumAmount
impl Sub for EthereumAmount
impl Amount for EthereumAmount
impl Copy for EthereumAmount
impl Eq for EthereumAmount
impl StructuralPartialEq for EthereumAmount
Auto Trait Implementations§
impl Freeze for EthereumAmount
impl RefUnwindSafe for EthereumAmount
impl Send for EthereumAmount
impl Sync for EthereumAmount
impl Unpin for EthereumAmount
impl UnwindSafe for EthereumAmount
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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)