pub struct DoubleInt(/* private fields */);
Expand description
Type that only deserializes from the true
boolean value.
§Examples
assert_eq!(
serde_json::from_str::<double_int::DoubleInt>("42").unwrap(),
42,
);
serde_json::from_str::<double_int::DoubleInt>("4.2").unwrap_err();
serde_json::from_str::<double_int::DoubleInt>("36028797018963968").unwrap_err();
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for DoubleInt
impl<'de> Deserialize<'de> for DoubleInt
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
impl Copy for DoubleInt
impl Eq for DoubleInt
impl StructuralPartialEq for DoubleInt
Auto Trait Implementations§
impl Freeze for DoubleInt
impl RefUnwindSafe for DoubleInt
impl Send for DoubleInt
impl Sync for DoubleInt
impl Unpin for DoubleInt
impl UnwindSafe for DoubleInt
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