Struct arrow_buffer::i256
source · pub struct i256 { /* private fields */ }
Expand description
A signed 256-bit integer
Implementations
sourceimpl i256
impl i256
sourcepub fn from_le_bytes(b: [u8; 32]) -> Self
pub fn from_le_bytes(b: [u8; 32]) -> Self
Create an integer value from its representation as a byte array in little-endian.
sourcepub fn from_be_bytes(b: [u8; 32]) -> Self
pub fn from_be_bytes(b: [u8; 32]) -> Self
Create an integer value from its representation as a byte array in little-endian.
pub fn from_i128(v: i128) -> Self
sourcepub fn from_parts(low: u128, high: i128) -> Self
pub fn from_parts(low: u128, high: i128) -> Self
Create an i256 from the provided low u128 and high i128
sourcepub fn to_i128(self) -> Option<i128>
pub fn to_i128(self) -> Option<i128>
Converts this i256
into an i128
returning None
if this would result
in truncation/overflow
sourcepub fn to_le_bytes(self) -> [u8; 32]
pub fn to_le_bytes(self) -> [u8; 32]
Return the memory representation of this integer as a byte array in little-endian byte order.
sourcepub fn to_be_bytes(self) -> [u8; 32]
pub fn to_be_bytes(self) -> [u8; 32]
Return the memory representation of this integer as a byte array in big-endian byte order.
sourcepub fn wrapping_abs(self) -> Self
pub fn wrapping_abs(self) -> Self
Computes the absolute value of this i256
sourcepub fn checked_abs(self) -> Option<Self>
pub fn checked_abs(self) -> Option<Self>
Computes the absolute value of this i256 returning None
if Self == Self::MIN
sourcepub fn wrapping_add(self, other: Self) -> Self
pub fn wrapping_add(self, other: Self) -> Self
Performs wrapping addition
sourcepub fn checked_add(self, other: Self) -> Option<Self>
pub fn checked_add(self, other: Self) -> Option<Self>
Performs checked addition
sourcepub fn wrapping_sub(self, other: Self) -> Self
pub fn wrapping_sub(self, other: Self) -> Self
Performs wrapping subtraction
sourcepub fn checked_sub(self, other: Self) -> Option<Self>
pub fn checked_sub(self, other: Self) -> Option<Self>
Performs checked subtraction
sourcepub fn wrapping_mul(self, other: Self) -> Self
pub fn wrapping_mul(self, other: Self) -> Self
Performs wrapping multiplication
sourcepub fn checked_mul(self, other: Self) -> Option<Self>
pub fn checked_mul(self, other: Self) -> Option<Self>
Performs checked multiplication
sourcepub fn wrapping_div(self, other: Self) -> Self
pub fn wrapping_div(self, other: Self) -> Self
Performs wrapping division
sourcepub fn checked_div(self, other: Self) -> Option<Self>
pub fn checked_div(self, other: Self) -> Option<Self>
Performs checked division
sourcepub fn wrapping_rem(self, other: Self) -> Self
pub fn wrapping_rem(self, other: Self) -> Self
Performs wrapping remainder
sourcepub fn checked_rem(self, other: Self) -> Option<Self>
pub fn checked_rem(self, other: Self) -> Option<Self>
Performs checked remainder
sourcepub fn checked_pow(self, exp: u32) -> Option<Self>
pub fn checked_pow(self, exp: u32) -> Option<Self>
Performs checked exponentiation
sourcepub fn wrapping_pow(self, exp: u32) -> Self
pub fn wrapping_pow(self, exp: u32) -> Self
Performs wrapping exponentiation
Trait Implementations
sourceimpl ArrowNativeType for i256
impl ArrowNativeType for i256
sourcefn from_usize(u: usize) -> Option<Self>
fn from_usize(u: usize) -> Option<Self>
sourcefn from_i32(_: i32) -> Option<Self>
fn from_i32(_: i32) -> Option<Self>
Option::Some
insteadsourceimpl AsPrimitive<i256> for i16
impl AsPrimitive<i256> for i16
sourceimpl AsPrimitive<i256> for i32
impl AsPrimitive<i256> for i32
sourceimpl AsPrimitive<i256> for i64
impl AsPrimitive<i256> for i64
sourceimpl AsPrimitive<i256> for i8
impl AsPrimitive<i256> for i8
sourceimpl Ord for i256
impl Ord for i256
1.21.0 · sourcefn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
1.21.0 · sourcefn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
sourceimpl PartialOrd<i256> for i256
impl PartialOrd<i256> for i256
sourcefn partial_cmp(&self, other: &Self) -> Option<Ordering>
fn partial_cmp(&self, other: &Self) -> Option<Ordering>
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read more