pub struct BigNum(_);
Implementations
sourceimpl BigNum
impl BigNum
pub fn from_bytes(bytes: Vec<u8>) -> Result<BigNum, DeserializeError>
sourceimpl BigNum
impl BigNum
pub fn from_str(string: &str) -> Result<BigNum, JsError>
pub fn to_str(&self) -> String
pub fn zero() -> Self
pub fn is_zero(&self) -> bool
pub fn checked_mul(&self, other: &BigNum) -> Result<BigNum, JsError>
pub fn checked_add(&self, other: &BigNum) -> Result<BigNum, JsError>
pub fn checked_sub(&self, other: &BigNum) -> Result<BigNum, JsError>
sourcepub fn clamped_sub(&self, other: &BigNum) -> BigNum
pub fn clamped_sub(&self, other: &BigNum) -> BigNum
returns 0 if it would otherwise underflow
pub fn checked_div(&self, other: &BigNum) -> Result<BigNum, JsError>
pub fn checked_div_ceil(&self, other: &BigNum) -> Result<BigNum, JsError>
pub fn compare(&self, rhs_value: &BigNum) -> i8
Trait Implementations
sourceimpl<'de> Deserialize<'de> for BigNum
impl<'de> Deserialize<'de> for BigNum
sourcefn 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
sourceimpl Deserialize for BigNum
impl Deserialize for BigNum
fn deserialize<R: BufRead + Seek>(
raw: &mut Deserializer<R>
) -> Result<Self, DeserializeError>
sourceimpl JsonSchema for BigNum
impl JsonSchema for BigNum
sourcefn schema_name() -> String
fn schema_name() -> String
The name of the generated JSON Schema. Read more
sourcefn json_schema(gen: &mut SchemaGenerator) -> Schema
fn json_schema(gen: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
sourcefn 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 moresourceimpl Ord for BigNum
impl Ord for BigNum
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<BigNum> for BigNum
impl PartialOrd<BigNum> for BigNum
sourcefn partial_cmp(&self, other: &BigNum) -> Option<Ordering>
fn partial_cmp(&self, other: &BigNum) -> 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 moresourceimpl Serialize for BigNum
impl Serialize for BigNum
fn serialize<'se, W: Write>(
&self,
serializer: &'se mut Serializer<W>
) -> Result<&'se mut Serializer<W>>
impl Copy for BigNum
impl Eq for BigNum
impl StructuralEq for BigNum
impl StructuralPartialEq for BigNum
Auto Trait Implementations
impl RefUnwindSafe for BigNum
impl Send for BigNum
impl Sync for BigNum
impl Unpin for BigNum
impl UnwindSafe for BigNum
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