pub struct DecimalU64(pub u64);Expand description
A 64-bit unsigned integer that is serialized as a decimal string in JSON to prevent precision loss across JavaScript, browser, and JSON boundaries.
Tuple Fields§
§0: u64Implementations§
Source§impl DecimalU64
impl DecimalU64
Trait Implementations§
Source§impl Clone for DecimalU64
impl Clone for DecimalU64
Source§fn clone(&self) -> DecimalU64
fn clone(&self) -> DecimalU64
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for DecimalU64
Source§impl Debug for DecimalU64
impl Debug for DecimalU64
Source§impl Default for DecimalU64
impl Default for DecimalU64
Source§fn default() -> DecimalU64
fn default() -> DecimalU64
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for DecimalU64
impl<'de> Deserialize<'de> for DecimalU64
Source§fn deserialize<D>(
deserializer: D,
) -> Result<DecimalU64, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<DecimalU64, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for DecimalU64
impl Display for DecimalU64
impl Eq for DecimalU64
Source§impl From<u64> for DecimalU64
impl From<u64> for DecimalU64
Source§fn from(val: u64) -> DecimalU64
fn from(val: u64) -> DecimalU64
Converts to this type from the input type.
Source§impl FromStr for DecimalU64
impl FromStr for DecimalU64
Source§type Err = ContractError
type Err = ContractError
The associated error which can be returned from parsing.
Source§fn from_str(s: &str) -> Result<DecimalU64, <DecimalU64 as FromStr>::Err>
fn from_str(s: &str) -> Result<DecimalU64, <DecimalU64 as FromStr>::Err>
Parses a string
s to return a value of this type. Read moreSource§impl Hash for DecimalU64
impl Hash for DecimalU64
Source§impl Ord for DecimalU64
impl Ord for DecimalU64
Source§fn cmp(&self, other: &DecimalU64) -> Ordering
fn cmp(&self, other: &DecimalU64) -> Ordering
1.21.0 (const: unstable) · 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
1.21.0 (const: unstable) · Source§fn 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
Source§impl PartialEq for DecimalU64
impl PartialEq for DecimalU64
Source§impl PartialOrd for DecimalU64
impl PartialOrd for DecimalU64
Source§impl Serialize for DecimalU64
impl Serialize for DecimalU64
Source§fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for DecimalU64
Auto Trait Implementations§
impl Freeze for DecimalU64
impl RefUnwindSafe for DecimalU64
impl Send for DecimalU64
impl Sync for DecimalU64
impl Unpin for DecimalU64
impl UnsafeUnpin for DecimalU64
impl UnwindSafe for DecimalU64
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