pub struct Int256(pub(crate) Box<i256>);
Expand description
A 256-bit signed integer.
Tuple Fields§
§0: Box<i256>
Implementations§
source§impl Int256
impl Int256
pub fn min_value() -> Self
pub fn max_value() -> Self
pub fn into_inner(self) -> i256
pub const fn size() -> usize
pub fn array_type() -> ArrayType
pub fn from_ne_bytes(bytes: [u8; 32]) -> Self
pub fn from_le_bytes(bytes: [u8; 32]) -> Self
pub fn from_be_bytes(bytes: [u8; 32]) -> Self
pub fn from_protobuf(input: &mut impl Read) -> ArrayResult<Self>
source§impl Int256
impl Int256
pub fn from_binary(input: &[u8]) -> ArrayResult<Self>
source§impl Int256
impl Int256
pub fn from_str_prefixed(src: &str) -> Result<Self, ParseIntError>
pub fn from_str_hex(src: &str) -> Result<Self, ParseIntError>
source§impl Int256
impl Int256
pub const MEMCMP_ENCODED_SIZE: usize = 32usize
pub fn memcmp_deserialize( deserializer: &mut Deserializer<impl Buf>, ) -> Result<Self>
Trait Implementations§
source§impl CheckedAdd for Int256
impl CheckedAdd for Int256
source§fn checked_add(&self, other: &Self) -> Option<Self>
fn checked_add(&self, other: &Self) -> Option<Self>
Adds two numbers, checking for overflow. If overflow happens,
None
is
returned.source§impl CheckedDiv for Int256
impl CheckedDiv for Int256
source§fn checked_div(&self, other: &Self) -> Option<Self>
fn checked_div(&self, other: &Self) -> Option<Self>
Divides two numbers, checking for underflow, overflow and division by
zero. If any of that happens,
None
is returned.source§impl CheckedMul for Int256
impl CheckedMul for Int256
source§fn checked_mul(&self, other: &Self) -> Option<Self>
fn checked_mul(&self, other: &Self) -> Option<Self>
Multiplies two numbers, checking for underflow or overflow. If underflow
or overflow happens,
None
is returned.source§impl CheckedNeg for Int256
impl CheckedNeg for Int256
source§fn checked_neg(&self) -> Option<Self>
fn checked_neg(&self) -> Option<Self>
Negates a number, returning
None
for results that can’t be represented, like signed MIN
values that can’t be positive, or non-zero unsigned values that can’t be negative. Read moresource§impl CheckedRem for Int256
impl CheckedRem for Int256
source§fn checked_rem(&self, other: &Self) -> Option<Self>
fn checked_rem(&self, other: &Self) -> Option<Self>
Finds the remainder of dividing two numbers, checking for underflow, overflow and division
by zero. If any of that happens,
None
is returned. Read moresource§impl CheckedSub for Int256
impl CheckedSub for Int256
source§fn checked_sub(&self, other: &Self) -> Option<Self>
fn checked_sub(&self, other: &Self) -> Option<Self>
Subtracts two numbers, checking for underflow. If underflow happens,
None
is returned.source§impl EstimateSize for Int256
impl EstimateSize for Int256
source§fn estimated_heap_size(&self) -> usize
fn estimated_heap_size(&self) -> usize
The estimated heap size of the current struct in bytes.
source§fn estimated_size(&self) -> usizewhere
Self: Sized,
fn estimated_size(&self) -> usizewhere
Self: Sized,
The estimated total size of the current struct in bytes, including the
estimated_heap_size
and the size of Self
.source§impl From<Int256> for ScalarImpl
impl From<Int256> for ScalarImpl
source§impl FromIterator<Int256> for Int256Array
impl FromIterator<Int256> for Int256Array
source§impl Num for Int256
impl Num for Int256
type FromStrRadixErr = ParseIntError
source§fn from_str_radix(str: &str, radix: u32) -> Result<Self, Self::FromStrRadixErr>
fn from_str_radix(str: &str, radix: u32) -> Result<Self, Self::FromStrRadixErr>
Convert from a string and radix (typically
2..=36
). Read moresource§impl Ord for Int256
impl Ord for Int256
source§impl PartialOrd for Int256
impl PartialOrd for Int256
source§impl Scalar for Int256
impl Scalar for Int256
source§type ScalarRefType<'a> = Int256Ref<'a>
type ScalarRefType<'a> = Int256Ref<'a>
Type for reference of
Scalar
source§fn as_scalar_ref(&self) -> Self::ScalarRefType<'_>
fn as_scalar_ref(&self) -> Self::ScalarRefType<'_>
Get a reference to current scalar.
fn to_scalar_value(self) -> ScalarImpl
source§impl TryFrom<ScalarImpl> for Int256
impl TryFrom<ScalarImpl> for Int256
source§type Error = ArrayError
type Error = ArrayError
The type returned in the event of a conversion error.
source§fn try_from(val: ScalarImpl) -> ArrayResult<Self>
fn try_from(val: ScalarImpl) -> ArrayResult<Self>
Performs the conversion.
source§impl<'a> WithDataType for &'a Int256
impl<'a> WithDataType for &'a Int256
source§fn default_data_type() -> DataType
fn default_data_type() -> DataType
Returns the most obvious
DataType
for the rust type.source§impl<'a> WithDataType for &'a mut Int256
impl<'a> WithDataType for &'a mut Int256
source§fn default_data_type() -> DataType
fn default_data_type() -> DataType
Returns the most obvious
DataType
for the rust type.source§impl WithDataType for Box<Int256>
impl WithDataType for Box<Int256>
source§fn default_data_type() -> DataType
fn default_data_type() -> DataType
Returns the most obvious
DataType
for the rust type.source§impl WithDataType for Int256
impl WithDataType for Int256
source§fn default_data_type() -> DataType
fn default_data_type() -> DataType
Returns the most obvious
DataType
for the rust type.impl Eq for Int256
impl StructuralPartialEq for Int256
Auto Trait Implementations§
impl Freeze for Int256
impl RefUnwindSafe for Int256
impl Send for Int256
impl Sync for Int256
impl Unpin for Int256
impl UnwindSafe for Int256
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> CheckedAdd for Twhere
T: CheckedAdd,
impl<T> CheckedAdd for Twhere
T: CheckedAdd,
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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 moresource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request
§impl<T> IntoResult<T> for T
impl<T> IntoResult<T> for T
type Err = Infallible
fn into_result(self) -> Result<T, <T as IntoResult<T>>::Err>
source§impl<T> IsNegative for T
impl<T> IsNegative for T
fn is_negative(&self) -> bool
source§impl<M> MetricVecRelabelExt for M
impl<M> MetricVecRelabelExt for M
source§fn relabel(
self,
metric_level: MetricLevel,
relabel_threshold: MetricLevel,
) -> RelabeledMetricVec<M>
fn relabel( self, metric_level: MetricLevel, relabel_threshold: MetricLevel, ) -> RelabeledMetricVec<M>
Equivalent to
RelabeledMetricVec::with_metric_level
.source§fn relabel_n(
self,
metric_level: MetricLevel,
relabel_threshold: MetricLevel,
relabel_num: usize,
) -> RelabeledMetricVec<M>
fn relabel_n( self, metric_level: MetricLevel, relabel_threshold: MetricLevel, relabel_num: usize, ) -> RelabeledMetricVec<M>
Equivalent to
RelabeledMetricVec::with_metric_level_relabel_n
.source§fn relabel_debug_1(
self,
relabel_threshold: MetricLevel,
) -> RelabeledMetricVec<M>
fn relabel_debug_1( self, relabel_threshold: MetricLevel, ) -> RelabeledMetricVec<M>
Equivalent to
RelabeledMetricVec::with_metric_level_relabel_n
with metric_level
set to
MetricLevel::Debug
and relabel_num
set to 1.§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<T> ToOwnedDatum for Twhere
T: Into<ScalarImpl>,
impl<T> ToOwnedDatum for Twhere
T: Into<ScalarImpl>,
source§fn to_owned_datum(self) -> Option<ScalarImpl>
fn to_owned_datum(self) -> Option<ScalarImpl>
Convert the datum to an owned
Datum
.