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.
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 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
Trait Implementations
sourceimpl ArrowNativeType for i256
impl ArrowNativeType for i256
sourcefn from_usize(u: usize) -> Option<Self>
fn from_usize(u: usize) -> Option<Self>
Convert native integer type from usize Read more
sourcefn from_i32(_: i32) -> Option<Self>
fn from_i32(_: i32) -> Option<Self>
👎Deprecated: please use
Option::Some insteadConvert native type from i32. Read more
sourceimpl Ord for i256
impl Ord for i256
1.21.0 · sourceconst fn max(self, other: Self) -> Self
const fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
1.21.0 · sourceconst fn min(self, other: Self) -> Self
const fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
1.50.0 · sourceconst fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
const fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
Restrict a value to a certain interval. Read more
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 · sourceconst fn le(&self, other: &Rhs) -> bool
const 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 Copy for i256
impl Eq for i256
impl StructuralEq for i256
impl StructuralPartialEq for i256
Auto Trait Implementations
impl RefUnwindSafe for i256
impl Send for i256
impl Sync for i256
impl Unpin for i256
impl UnwindSafe for i256
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more