pub enum Int {
I64(i64),
BigInt(BigInt),
}
Expand description
Variants§
Trait Implementations§
source§impl From<DecodedInt> for Int
impl From<DecodedInt> for Int
source§fn from(uint: DecodedInt) -> Self
fn from(uint: DecodedInt) -> Self
Note that if the DecodedInt represents -0, converting it to an Integer will result in a 0. If negative zero is significant to your use case, check it using DecodedInt::is_negative_zero before converting it to an Integer.
source§impl From<DecodedUInt> for Int
impl From<DecodedUInt> for Int
source§fn from(uint: DecodedUInt) -> Self
fn from(uint: DecodedUInt) -> Self
Converts to this type from the input type.
source§impl IntAccess for Int
impl IntAccess for Int
source§fn as_i64(&self) -> Option<i64>
fn as_i64(&self) -> Option<i64>
Returns the value as an
i64
if it can be represented as such. Read moresource§fn as_big_int(&self) -> Option<&BigInt>
fn as_big_int(&self) -> Option<&BigInt>
Returns a reference as a
BigInt
if it is represented as such. Note that this
method may return None
if the underlying representation is not stored in a BigInt
such as if it is represented as an i64
so it is somewhat asymmetric with respect
to IntAccess::as_i64
. Read moresource§impl Ord for Int
impl Ord for Int
source§impl PartialEq<Int> for Int
impl PartialEq<Int> for Int
source§impl PartialOrd<Int> for Int
impl PartialOrd<Int> for Int
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 Eq for Int
Auto Trait Implementations§
impl RefUnwindSafe for Int
impl Send for Int
impl Sync for Int
impl Unpin for Int
impl UnwindSafe for Int
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<V> IntoAnnotatedElement for Vwhere
V: Into<Value>,
impl<V> IntoAnnotatedElement for Vwhere V: Into<Value>,
source§fn with_annotations<I: IntoAnnotations>(self, annotations: I) -> Element
fn with_annotations<I: IntoAnnotations>(self, annotations: I) -> Element
Converts the value into an Element with the specified annotations.