Struct substreams_ethereum_core::scalar::EthBigInt
source · pub struct EthBigInt { /* private fields */ }
Implementations
sourceimpl EthBigInt
impl EthBigInt
pub fn new(i: BigInt) -> EthBigInt
pub fn get_big_int(&self) -> BigInt
pub fn to_decimal(&self, decimals: u64) -> BigDecimal
Trait Implementations
sourceimpl From<U128> for EthBigInt
impl From<U128> for EthBigInt
sourcefn from(value: U128) -> EthBigInt
fn from(value: U128) -> EthBigInt
This implementation assumes that U128 represents an unsigned U128,
and not a signed U128 (aka int128 in Solidity). Right now, this is
all we need (for block numbers). If it ever becomes necessary to
handle signed U128s, we should add the same
{to,from}_{signed,unsigned}_u128
methods that we have for U256.
sourceimpl From<U64> for EthBigInt
impl From<U64> for EthBigInt
sourcefn from(value: U64) -> EthBigInt
fn from(value: U64) -> EthBigInt
This implementation assumes that U64 represents an unsigned U64,
and not a signed U64 (aka int64 in Solidity). Right now, this is
all we need (for block numbers). If it ever becomes necessary to
handle signed U64s, we should add the same
{to,from}_{signed,unsigned}_u64
methods that we have for U64.
sourceimpl Ord for EthBigInt
impl Ord for EthBigInt
1.21.0 · sourcefn 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
1.21.0 · sourcefn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl PartialOrd<EthBigInt> for EthBigInt
impl PartialOrd<EthBigInt> for EthBigInt
sourcefn partial_cmp(&self, other: &EthBigInt) -> Option<Ordering>
fn partial_cmp(&self, other: &EthBigInt) -> Option<Ordering>
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 moreimpl Eq for EthBigInt
impl StructuralEq for EthBigInt
impl StructuralPartialEq for EthBigInt
Auto Trait Implementations
impl RefUnwindSafe for EthBigInt
impl Send for EthBigInt
impl Sync for EthBigInt
impl Unpin for EthBigInt
impl UnwindSafe for EthBigInt
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
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