pub struct SafeInteger(/* private fields */);Expand description
Integer exactly representable as an IEEE-754 double (|value| <= 2^53 - 1), so it crosses JSON and JavaScript/WASM boundaries unchanged.
Implementations§
Trait Implementations§
Source§impl Clone for SafeInteger
impl Clone for SafeInteger
Source§fn clone(&self) -> SafeInteger
fn clone(&self) -> SafeInteger
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 SafeInteger
Source§impl Debug for SafeInteger
impl Debug for SafeInteger
Source§impl<'de> Deserialize<'de> for SafeInteger
impl<'de> Deserialize<'de> for SafeInteger
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
impl Eq for SafeInteger
Source§impl From<SafeInteger> for i64
impl From<SafeInteger> for i64
Source§fn from(value: SafeInteger) -> Self
fn from(value: SafeInteger) -> Self
Converts to this type from the input type.
Source§impl From<i32> for SafeInteger
impl From<i32> for SafeInteger
Source§impl Hash for SafeInteger
impl Hash for SafeInteger
Source§impl Ord for SafeInteger
impl Ord for SafeInteger
Source§fn cmp(&self, other: &SafeInteger) -> Ordering
fn cmp(&self, other: &SafeInteger) -> 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
Source§impl PartialEq for SafeInteger
impl PartialEq for SafeInteger
Source§impl PartialOrd for SafeInteger
impl PartialOrd for SafeInteger
Source§impl Serialize for SafeInteger
impl Serialize for SafeInteger
impl StructuralPartialEq for SafeInteger
Auto Trait Implementations§
impl Freeze for SafeInteger
impl RefUnwindSafe for SafeInteger
impl Send for SafeInteger
impl Sync for SafeInteger
impl Unpin for SafeInteger
impl UnsafeUnpin for SafeInteger
impl UnwindSafe for SafeInteger
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