pub struct BigInteger(pub Uint256);Tuple Fields§
§0: Uint256Implementations§
Source§impl BigInteger
impl BigInteger
pub const MAX: Self
pub const MIN: Self
pub const fn new(value: u128) -> Self
pub fn scale_down(&self, decimals: u32) -> BigDecimal
pub fn scale_up(&self, decimals: u32) -> Self
pub fn to_uint128(&self) -> StdResult<Uint128>
pub fn to_uint256(&self) -> Uint256
pub fn create_with_scale(value: u128, decimals: u32) -> Self
pub fn is_zero(&self) -> bool
pub fn zero() -> Self
pub fn one() -> Self
pub fn saturating_sub(&self, rhs: Self) -> Self
pub fn checked_sub(&self, rhs: Self) -> StdResult<Self>
pub fn pow(&self, exp: u32) -> Self
pub fn from_be_bytes(bytes: [u8; 32]) -> Self
pub fn from_le_bytes(bytes: [u8; 32]) -> Self
pub fn to_be_bytes(&self) -> [u8; 32]
pub fn to_le_bytes(&self) -> [u8; 32]
Trait Implementations§
Source§impl Add for BigInteger
impl Add for BigInteger
Source§type Output = BigInteger
type Output = BigInteger
The resulting type after applying the
+ operator.Source§impl AddAssign for BigInteger
impl AddAssign for BigInteger
Source§fn add_assign(&mut self, rhs: Self)
fn add_assign(&mut self, rhs: Self)
Performs the
+= operation. Read moreSource§impl Clone for BigInteger
impl Clone for BigInteger
Source§fn clone(&self) -> BigInteger
fn clone(&self) -> BigInteger
Returns a duplicate 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 BigInteger
impl Debug for BigInteger
Source§impl Default for BigInteger
impl Default for BigInteger
Source§fn default() -> BigInteger
fn default() -> BigInteger
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for BigInteger
impl<'de> Deserialize<'de> for BigInteger
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 BigInteger
impl Display for BigInteger
Source§impl Div<BigDecimal> for BigInteger
impl Div<BigDecimal> for BigInteger
Source§type Output = BigDecimal
type Output = BigDecimal
The resulting type after applying the
/ operator.Source§impl Div<BigInteger> for BigDecimal
impl Div<BigInteger> for BigDecimal
Source§type Output = BigDecimal
type Output = BigDecimal
The resulting type after applying the
/ operator.Source§impl Div for BigInteger
impl Div for BigInteger
Source§type Output = BigInteger
type Output = BigInteger
The resulting type after applying the
/ operator.Source§impl DivAssign for BigInteger
impl DivAssign for BigInteger
Source§fn div_assign(&mut self, rhs: Self)
fn div_assign(&mut self, rhs: Self)
Performs the
/= operation. Read moreSource§impl From<BigDecimal> for BigInteger
impl From<BigDecimal> for BigInteger
Source§fn from(value: BigDecimal) -> Self
fn from(value: BigDecimal) -> Self
Converts to this type from the input type.
Source§impl From<BigInteger> for String
impl From<BigInteger> for String
Source§fn from(value: BigInteger) -> Self
fn from(value: BigInteger) -> Self
Converts to this type from the input type.
Source§impl From<BigInteger> for Uint256
impl From<BigInteger> for Uint256
Source§fn from(value: BigInteger) -> Self
fn from(value: BigInteger) -> Self
Converts to this type from the input type.
Source§impl From<Uint128> for BigInteger
impl From<Uint128> for BigInteger
Source§impl From<u128> for BigInteger
impl From<u128> for BigInteger
Source§impl From<u16> for BigInteger
impl From<u16> for BigInteger
Source§impl From<u32> for BigInteger
impl From<u32> for BigInteger
Source§impl From<u64> for BigInteger
impl From<u64> for BigInteger
Source§impl From<u8> for BigInteger
impl From<u8> for BigInteger
Source§impl FromStr for BigInteger
impl FromStr for BigInteger
Source§impl JsonSchema for BigInteger
impl JsonSchema for BigInteger
Source§fn schema_name() -> String
fn schema_name() -> String
The name of the generated JSON Schema. Read more
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
Whether JSON Schemas generated for this type should be re-used where possible using the
$ref keyword. Read moreSource§impl Mul<BigDecimal> for BigInteger
impl Mul<BigDecimal> for BigInteger
Source§type Output = BigDecimal
type Output = BigDecimal
The resulting type after applying the
* operator.Source§impl Mul<BigInteger> for BigDecimal
impl Mul<BigInteger> for BigDecimal
Source§type Output = BigDecimal
type Output = BigDecimal
The resulting type after applying the
* operator.Source§impl Mul for BigInteger
impl Mul for BigInteger
Source§type Output = BigInteger
type Output = BigInteger
The resulting type after applying the
* operator.Source§impl MulAssign for BigInteger
impl MulAssign for BigInteger
Source§fn mul_assign(&mut self, rhs: Self)
fn mul_assign(&mut self, rhs: Self)
Performs the
*= operation. Read moreSource§impl Ord for BigInteger
impl Ord for BigInteger
Source§fn cmp(&self, other: &BigInteger) -> Ordering
fn cmp(&self, other: &BigInteger) -> 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 BigInteger
impl PartialEq for BigInteger
Source§impl PartialOrd for BigInteger
impl PartialOrd for BigInteger
Source§impl Serialize for BigInteger
impl Serialize for BigInteger
Source§impl Sub for BigInteger
impl Sub for BigInteger
Source§type Output = BigInteger
type Output = BigInteger
The resulting type after applying the
- operator.Source§impl SubAssign for BigInteger
impl SubAssign for BigInteger
Source§fn sub_assign(&mut self, rhs: Self)
fn sub_assign(&mut self, rhs: Self)
Performs the
-= operation. Read moreSource§impl<'a> Sum<&'a BigInteger> for BigInteger
impl<'a> Sum<&'a BigInteger> for BigInteger
Source§impl Sum for BigInteger
impl Sum for BigInteger
impl Copy for BigInteger
impl Eq for BigInteger
impl StructuralPartialEq for BigInteger
Auto Trait Implementations§
impl Freeze for BigInteger
impl RefUnwindSafe for BigInteger
impl Send for BigInteger
impl Sync for BigInteger
impl Unpin for BigInteger
impl UnwindSafe for BigInteger
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§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more