pub enum Int {
I8(i8),
I16(i16),
I32(i32),
I64(i64),
}
Expand description
A signed integer.
Variants§
Trait Implementations§
source§impl AddAssign for Int
impl AddAssign for Int
source§fn add_assign(&mut self, other: Int)
fn add_assign(&mut self, other: Int)
Performs the
+=
operation. Read moresource§impl<'de> Deserialize<'de> for Int
impl<'de> Deserialize<'de> for Int
source§fn deserialize<D>(
deserializer: D
) -> Result<Int, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D
) -> Result<Int, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl DivAssign for Int
impl DivAssign for Int
source§fn div_assign(&mut self, other: Int)
fn div_assign(&mut self, other: Int)
Performs the
/=
operation. Read moresource§impl FromStream for Int
impl FromStream for Int
§type Context = ()
type Context = ()
The decoding context of this type, useful in situations where the stream to be decoded
may be too large to hold in main memory. Read more
source§fn from_stream<'life0, 'async_trait, D>(
cxt: <Int as FromStream>::Context,
decoder: &'life0 mut D
) -> Pin<Box<dyn Future<Output = Result<Int, <D as Decoder>::Error>> + Send + 'async_trait>>
fn from_stream<'life0, 'async_trait, D>( cxt: <Int as FromStream>::Context, decoder: &'life0 mut D ) -> Pin<Box<dyn Future<Output = Result<Int, <D as Decoder>::Error>> + Send + 'async_trait>>
Parse this value using the given
Decoder
.source§impl GetSize for Int
impl GetSize for Int
source§fn get_heap_size(&self) -> usize
fn get_heap_size(&self) -> usize
Determines how many bytes this object occupies inside the heap. Read more
source§fn get_stack_size() -> usize
fn get_stack_size() -> usize
Determines how may bytes this object occupies inside the stack. Read more
source§impl<'en> IntoStream<'en> for Int
impl<'en> IntoStream<'en> for Int
source§impl MulAssign for Int
impl MulAssign for Int
source§fn mul_assign(&mut self, other: Int)
fn mul_assign(&mut self, other: Int)
Performs the
*=
operation. Read moresource§impl NumberInstance for Int
impl NumberInstance for Int
type Abs = Int
type Exp = Float
type Log = Float
type Round = Int
type Class = IntType
source§fn class(&self) -> IntType
fn class(&self) -> IntType
Get an impl of
NumberClass
describing this number.source§fn log<N>(self, base: N) -> <Int as NumberInstance>::Log
fn log<N>(self, base: N) -> <Int as NumberInstance>::Log
Compute the logarithm of this number with respect to the given
base
.source§fn round(self) -> <Int as NumberInstance>::Round
fn round(self) -> <Int as NumberInstance>::Round
Return this number rounded to the nearest integer.
source§impl Ord for Int
impl Ord for Int
source§impl PartialOrd for Int
impl PartialOrd 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 moresource§impl RealInstance for Int
impl RealInstance for Int
source§impl RemAssign for Int
impl RemAssign for Int
source§fn rem_assign(&mut self, other: Int)
fn rem_assign(&mut self, other: Int)
Performs the
%=
operation. Read moresource§impl Serialize for Int
impl Serialize for Int
source§fn serialize<S>(
&self,
s: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn serialize<S>(
&self,
s: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
Serialize this value into the given Serde serializer. Read more
source§impl SubAssign for Int
impl SubAssign for Int
source§fn sub_assign(&mut self, other: Int)
fn sub_assign(&mut self, other: Int)
Performs the
-=
operation. Read moreimpl Copy for Int
impl 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<F> Match for F
impl<F> Match for F
source§fn matches<T>(&self) -> boolwhere
T: TryCastFrom<Self>,
fn matches<T>(&self) -> boolwhere
T: TryCastFrom<Self>,
Returns
true
if self
can be cast into the target type T
.§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<F, T> TryCastFrom<F> for Twhere
T: CastFrom<F>,
impl<F, T> TryCastFrom<F> for Twhere
T: CastFrom<F>,
source§fn can_cast_from(_: &F) -> bool
fn can_cast_from(_: &F) -> bool
Test if
value
can be cast into Self
.source§fn opt_cast_from(f: F) -> Option<T>
fn opt_cast_from(f: F) -> Option<T>
Returns
Some(Self)
if the source value can be cast into Self
, otherwise None
.source§impl<F, T> TryCastInto<T> for Fwhere
T: TryCastFrom<F>,
impl<F, T> TryCastInto<T> for Fwhere
T: TryCastFrom<F>,
source§fn can_cast_into(&self) -> bool
fn can_cast_into(&self) -> bool
Test if
self
can be cast into T
.source§fn opt_cast_into(self) -> Option<T>
fn opt_cast_into(self) -> Option<T>
Returns
Some(T)
if self
can be cast into T
, otherwise None
.