pub struct RangeError<T>(/* private fields */);
Available on crate feature
napi-6
only.Expand description
Indicates a lossless conversion from a JsBigInt
to a Rust integer
could not be performed.
Failures include:
- Negative sign on an unsigned int
- Overflow of an int
- Underflow of a signed int
Implementations§
Source§impl<T> RangeError<T>
impl<T> RangeError<T>
Sourcepub fn into_inner(self) -> T
pub fn into_inner(self) -> T
Get the lossy value read from a BigInt
. It may be truncated,
sign extended or wrapped.
Trait Implementations§
Source§impl<T: Clone> Clone for RangeError<T>
impl<T: Clone> Clone for RangeError<T>
Source§fn clone(&self) -> RangeError<T>
fn clone(&self) -> RangeError<T>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<T: Debug> Debug for RangeError<T>
impl<T: Debug> Debug for RangeError<T>
Source§impl<T> Display for RangeError<T>where
T: Display,
impl<T> Display for RangeError<T>where
T: Display,
Source§impl<T> Error for RangeError<T>
impl<T> Error for RangeError<T>
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl<T: PartialEq> PartialEq for RangeError<T>
impl<T: PartialEq> PartialEq for RangeError<T>
impl<T: Copy> Copy for RangeError<T>
impl<T: Eq> Eq for RangeError<T>
impl<T> StructuralPartialEq for RangeError<T>
Auto Trait Implementations§
impl<T> Freeze for RangeError<T>where
T: Freeze,
impl<T> RefUnwindSafe for RangeError<T>where
T: RefUnwindSafe,
impl<T> Send for RangeError<T>where
T: Send,
impl<T> Sync for RangeError<T>where
T: Sync,
impl<T> Unpin for RangeError<T>where
T: Unpin,
impl<T> UnwindSafe for RangeError<T>where
T: UnwindSafe,
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,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more