pub struct NumberRef<'a> { /* private fields */ }Expand description
A reference to a JSON number.
Implementations§
Source§impl NumberRef<'_>
impl NumberRef<'_>
Sourcepub fn as_u64(self) -> Option<u64>
pub fn as_u64(self) -> Option<u64>
If the number is an integer, returns the associated u64. Returns None otherwise.
Sourcepub fn as_i64(self) -> Option<i64>
pub fn as_i64(self) -> Option<i64>
If the number is an integer, returns the associated i64. Returns None otherwise.
Trait Implementations§
Source§impl Ord for NumberRef<'_>
impl Ord for NumberRef<'_>
Source§impl PartialOrd for NumberRef<'_>
impl PartialOrd for NumberRef<'_>
impl<'a> Copy for NumberRef<'a>
impl Eq for NumberRef<'_>
Auto Trait Implementations§
impl<'a> Freeze for NumberRef<'a>
impl<'a> RefUnwindSafe for NumberRef<'a>
impl<'a> Send for NumberRef<'a>
impl<'a> Sync for NumberRef<'a>
impl<'a> Unpin for NumberRef<'a>
impl<'a> UnwindSafe for NumberRef<'a>
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