pub struct U64String(/* private fields */);Expand description
A u64 that serializes as a JSON string.
§Examples
use r402_protocol::payment::U64String;
let value = U64String::from(42_u64);
assert_eq!(value.inner(), 42);
assert_eq!(serde_json::to_string(&value).unwrap(), r#""42""#);Implementations§
Trait Implementations§
impl Copy for U64String
Source§impl<'de> Deserialize<'de> for U64String
impl<'de> Deserialize<'de> for U64String
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 U64String
impl StructuralPartialEq for U64String
Auto Trait Implementations§
impl Freeze for U64String
impl RefUnwindSafe for U64String
impl Send for U64String
impl Sync for U64String
impl Unpin for U64String
impl UnsafeUnpin for U64String
impl UnwindSafe for U64String
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
Fallible version of
ToCompactString::to_compact_string() Read moreSource§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
Converts the given value to a
CompactString. Read more