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 PartialEq for NumberRef<'_>
impl PartialEq for NumberRef<'_>
source§impl PartialOrd for NumberRef<'_>
impl PartialOrd for NumberRef<'_>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self and other) and is used by the <=
operator. Read moreimpl<'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