pub struct I64(/* private fields */);Expand description
A subtype of Value that represents a specific integer variant
ranging from 8 to 64 bits, signed or unsigned
64 bit signed integer
Implementations§
source§impl I64
impl I64
sourcepub fn unsized_bitwise_not(&self) -> Self
pub fn unsized_bitwise_not(&self) -> Self
Bitwise NOT that attempts to remove the effect of the size of the integer:
!1u8 == 0u8 instead of !1u8 == 254u8
sourcepub fn logical_lshift(&self, right: i32) -> Result<Self, Error>
pub fn logical_lshift(&self, right: i32) -> Result<Self, Error>
Shift that always ignores the msb
sourcepub fn logical_rshift(&self, right: i32) -> Result<Self, Error>
pub fn logical_rshift(&self, right: i32) -> Result<Self, Error>
Shift that always ignores the msb
sourcepub fn arithmetic_lshift(&self, right: i32) -> Result<Self, Error>
pub fn arithmetic_lshift(&self, right: i32) -> Result<Self, Error>
Shift that always preserves the msb
sourcepub fn arithmetic_rshift(&self, right: i32) -> Result<Self, Error>
pub fn arithmetic_rshift(&self, right: i32) -> Result<Self, Error>
Shift that always preserves the msb
sourcepub fn from_str_radix(s: &str) -> Result<Self, Error>
pub fn from_str_radix(s: &str) -> Result<Self, Error>
Creates a new integer from a string representation of a base-n number
The string must be in the form of 0b<binary>, 0o<octal>, 0x<hex>, or 0<octal>
Trait Implementations§
source§impl ArithmeticOperationExt for I64
impl ArithmeticOperationExt for I64
source§fn arithmetic_op(
self,
right: Self,
operation: ArithmeticOperation
) -> Result<Self, Error>
fn arithmetic_op( self, right: Self, operation: ArithmeticOperation ) -> Result<Self, Error>
Perform an arithmetic operation on two values
If the operation is not supported on the given type,
an
Error::UnsupportedOperation will be returned Read moresource§impl BitwiseOperationExt for I64
impl BitwiseOperationExt for I64
source§fn bitwise_op(
self,
right: Self,
operation: BitwiseOperation
) -> Result<Self, Error>
fn bitwise_op( self, right: Self, operation: BitwiseOperation ) -> Result<Self, Error>
Perform a bitwise operation on two values
If the operation is not supported on the given type,
an
Error::UnsupportedOperation will be returned Read moresource§impl BooleanOperationExt for I64
impl BooleanOperationExt for I64
source§fn boolean_op(
self,
right: Self,
operation: BooleanOperation
) -> Result<Value, Error>
fn boolean_op( self, right: Self, operation: BooleanOperation ) -> Result<Value, Error>
Perform a boolean operation on two values
If the operation is not supported on the given type,
an
Error::UnsupportedOperation will be returned Read moresource§impl<'de> Deserialize<'de> for I64
impl<'de> Deserialize<'de> for I64
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Ord for I64
impl Ord for I64
source§impl PartialOrd for I64
impl PartialOrd for I64
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 ValueTrait for I64
impl ValueTrait for I64
source§fn into_inner(self) -> i64
fn into_inner(self) -> i64
Consumes the value and returns the inner value
impl Eq for I64
impl StructuralPartialEq for I64
Auto Trait Implementations§
impl Freeze for I64
impl RefUnwindSafe for I64
impl Send for I64
impl Sync for I64
impl Unpin for I64
impl UnwindSafe for I64
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