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
ScalarSource§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,
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<T> Downcast for Twhere
T: AsAny + ?Sized,
impl<T> Downcast for Twhere
T: AsAny + ?Sized,
§fn downcast_ref<T>(&self) -> Option<&T>where
T: AsAny,
fn downcast_ref<T>(&self) -> Option<&T>where
T: AsAny,
Forward to the method defined on the type
Any.§fn downcast_mut<T>(&mut self) -> Option<&mut T>where
T: AsAny,
fn downcast_mut<T>(&mut self) -> Option<&mut T>where
T: AsAny,
Forward to the method defined on the type
Any.§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<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
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> SameOrElseExt for Twhere
T: Eq,
impl<T> SameOrElseExt for Twhere
T: Eq,
Source§fn same_or_else(self, other: T, f: impl FnOnce() -> T) -> T
fn same_or_else(self, other: T, f: impl FnOnce() -> T) -> T
Check if
self and other are equal, if so, return self, otherwise return the result of f().§impl<T> Scope for T
impl<T> Scope 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.