pub struct I256(/* private fields */);
Implementations§
Source§impl I256
impl I256
pub const fn neg_one() -> Self
pub const fn into_inner(self) -> U256
pub const fn from_inner(inner: U256) -> Self
pub const fn one() -> Self
pub const fn zero() -> Self
pub fn is_neg(&self) -> bool
Sourcepub fn uabs(&self) -> U256
pub fn uabs(&self) -> U256
Absolute value of a number. Can be thought as function from i256 to u256, so doesn’t abort.
pub fn abs(self) -> Self
Trait Implementations§
Source§impl AddAssign for I256
impl AddAssign for I256
Source§fn add_assign(&mut self, rhs: Self)
fn add_assign(&mut self, rhs: Self)
Performs the
+=
operation. Read moreSource§impl<'de> Deserialize<'de> for I256
impl<'de> Deserialize<'de> for I256
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 DivAssign for I256
impl DivAssign for I256
Source§fn div_assign(&mut self, rhs: Self)
fn div_assign(&mut self, rhs: Self)
Performs the
/=
operation. Read moreSource§impl MulAssign for I256
impl MulAssign for I256
Source§fn mul_assign(&mut self, rhs: Self)
fn mul_assign(&mut self, rhs: Self)
Performs the
*=
operation. Read moreSource§impl Ord for I256
impl Ord for I256
Source§impl PartialOrd for I256
impl PartialOrd for I256
Source§impl RemAssign for I256
impl RemAssign for I256
Source§fn rem_assign(&mut self, rhs: Self)
fn rem_assign(&mut self, rhs: Self)
Performs the
%=
operation. Read moreSource§impl SubAssign for I256
impl SubAssign for I256
Source§fn sub_assign(&mut self, rhs: Self)
fn sub_assign(&mut self, rhs: Self)
Performs the
-=
operation. Read moreimpl Copy for I256
impl Eq for I256
impl StructuralPartialEq for I256
Auto Trait Implementations§
impl Freeze for I256
impl RefUnwindSafe for I256
impl Send for I256
impl Sync for I256
impl Unpin for I256
impl UnwindSafe for I256
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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more