pub struct NonPositiveInteger(/* private fields */);
Implementations§
Source§impl NonPositiveInteger
impl NonPositiveInteger
Sourcepub unsafe fn new_unchecked(n: BigInt) -> Self
pub unsafe fn new_unchecked(n: BigInt) -> Self
Sourcepub fn from_bytes_be(bytes: &[u8]) -> Self
pub fn from_bytes_be(bytes: &[u8]) -> Self
Creates a non positive integer from its unsigned big endian bytes representation.
Sourcepub fn from_bytes_le(bytes: &[u8]) -> Self
pub fn from_bytes_le(bytes: &[u8]) -> Self
Creates a non positive integer from its unsigned little endian bytes representation.
Sourcepub unsafe fn from_signed_bytes_be_unchecked(bytes: &[u8]) -> Self
pub unsafe fn from_signed_bytes_be_unchecked(bytes: &[u8]) -> Self
Creates a non positive integer from its signed big endian bytes representation.
§Safety
The represented number must be non positive.
Sourcepub unsafe fn from_signed_bytes_le_unchecked(bytes: &[u8]) -> Self
pub unsafe fn from_signed_bytes_le_unchecked(bytes: &[u8]) -> Self
Creates a non positive integer from its signed little endian bytes representation.
§Safety
The represented number must be non positive.
pub fn from_signed_bytes_be(bytes: &[u8]) -> Result<Self, IntegerIsPositive>
pub fn from_signed_bytes_le(bytes: &[u8]) -> Result<Self, IntegerIsPositive>
pub fn into_big_int(self) -> BigInt
pub fn zero() -> Self
pub fn is_zero(&self) -> bool
Sourcepub fn lexical_representation(&self) -> NonPositiveIntegerBuf
pub fn lexical_representation(&self) -> NonPositiveIntegerBuf
Returns a lexical representation of this non positive integer.
pub fn to_bytes_be(&self) -> (Sign, Vec<u8>)
pub fn to_bytes_le(&self) -> (Sign, Vec<u8>)
pub fn to_signed_bytes_be(&self) -> Vec<u8> ⓘ
pub fn to_signed_bytes_le(&self) -> Vec<u8> ⓘ
Trait Implementations§
Source§impl Add<Integer> for NonPositiveInteger
impl Add<Integer> for NonPositiveInteger
Source§impl Add<NegativeInteger> for NonPositiveInteger
impl Add<NegativeInteger> for NonPositiveInteger
Source§type Output = NonPositiveInteger
type Output = NonPositiveInteger
The resulting type after applying the
+
operator.Source§impl Add<NonNegativeInteger> for NonPositiveInteger
impl Add<NonNegativeInteger> for NonPositiveInteger
Source§type Output = NonPositiveInteger
type Output = NonPositiveInteger
The resulting type after applying the
+
operator.Source§impl Add<NonPositiveInteger> for NegativeInteger
impl Add<NonPositiveInteger> for NegativeInteger
Source§type Output = NegativeInteger
type Output = NegativeInteger
The resulting type after applying the
+
operator.Source§impl Add<NonPositiveInteger> for NonNegativeInteger
impl Add<NonPositiveInteger> for NonNegativeInteger
Source§type Output = NonNegativeInteger
type Output = NonNegativeInteger
The resulting type after applying the
+
operator.Source§impl Add<NonPositiveInteger> for PositiveInteger
impl Add<NonPositiveInteger> for PositiveInteger
Source§type Output = PositiveInteger
type Output = PositiveInteger
The resulting type after applying the
+
operator.Source§impl Add<PositiveInteger> for NonPositiveInteger
impl Add<PositiveInteger> for NonPositiveInteger
Source§type Output = NonPositiveInteger
type Output = NonPositiveInteger
The resulting type after applying the
+
operator.Source§impl Add<i16> for NonPositiveInteger
impl Add<i16> for NonPositiveInteger
Source§impl Add<i32> for NonPositiveInteger
impl Add<i32> for NonPositiveInteger
Source§impl Add<i64> for NonPositiveInteger
impl Add<i64> for NonPositiveInteger
Source§impl Add<i8> for NonPositiveInteger
impl Add<i8> for NonPositiveInteger
Source§impl Add<isize> for NonPositiveInteger
impl Add<isize> for NonPositiveInteger
Source§impl Add<u16> for NonPositiveInteger
impl Add<u16> for NonPositiveInteger
Source§impl Add<u32> for NonPositiveInteger
impl Add<u32> for NonPositiveInteger
Source§impl Add<u64> for NonPositiveInteger
impl Add<u64> for NonPositiveInteger
Source§impl Add<u8> for NonPositiveInteger
impl Add<u8> for NonPositiveInteger
Source§impl Add<usize> for NonPositiveInteger
impl Add<usize> for NonPositiveInteger
Source§impl Add for NonPositiveInteger
impl Add for NonPositiveInteger
Source§type Output = NonPositiveInteger
type Output = NonPositiveInteger
The resulting type after applying the
+
operator.Source§impl AsRef<BigInt> for NonPositiveInteger
impl AsRef<BigInt> for NonPositiveInteger
Source§impl Borrow<BigInt> for NonPositiveInteger
impl Borrow<BigInt> for NonPositiveInteger
Source§impl Clone for NonPositiveInteger
impl Clone for NonPositiveInteger
Source§fn clone(&self) -> NonPositiveInteger
fn clone(&self) -> NonPositiveInteger
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for NonPositiveInteger
impl Debug for NonPositiveInteger
Source§impl Display for NonPositiveInteger
impl Display for NonPositiveInteger
Source§impl Div<Integer> for NonPositiveInteger
impl Div<Integer> for NonPositiveInteger
Source§impl Div<NegativeInteger> for NonPositiveInteger
impl Div<NegativeInteger> for NonPositiveInteger
Source§type Output = NonPositiveInteger
type Output = NonPositiveInteger
The resulting type after applying the
/
operator.Source§impl Div<NonNegativeInteger> for NonPositiveInteger
impl Div<NonNegativeInteger> for NonPositiveInteger
Source§type Output = NonPositiveInteger
type Output = NonPositiveInteger
The resulting type after applying the
/
operator.Source§impl Div<NonPositiveInteger> for NegativeInteger
impl Div<NonPositiveInteger> for NegativeInteger
Source§type Output = NegativeInteger
type Output = NegativeInteger
The resulting type after applying the
/
operator.Source§impl Div<NonPositiveInteger> for NonNegativeInteger
impl Div<NonPositiveInteger> for NonNegativeInteger
Source§type Output = NonNegativeInteger
type Output = NonNegativeInteger
The resulting type after applying the
/
operator.Source§impl Div<NonPositiveInteger> for PositiveInteger
impl Div<NonPositiveInteger> for PositiveInteger
Source§type Output = PositiveInteger
type Output = PositiveInteger
The resulting type after applying the
/
operator.Source§impl Div<PositiveInteger> for NonPositiveInteger
impl Div<PositiveInteger> for NonPositiveInteger
Source§type Output = NonPositiveInteger
type Output = NonPositiveInteger
The resulting type after applying the
/
operator.Source§impl Div<i16> for NonPositiveInteger
impl Div<i16> for NonPositiveInteger
Source§impl Div<i32> for NonPositiveInteger
impl Div<i32> for NonPositiveInteger
Source§impl Div<i64> for NonPositiveInteger
impl Div<i64> for NonPositiveInteger
Source§impl Div<i8> for NonPositiveInteger
impl Div<i8> for NonPositiveInteger
Source§impl Div<isize> for NonPositiveInteger
impl Div<isize> for NonPositiveInteger
Source§impl Div<u16> for NonPositiveInteger
impl Div<u16> for NonPositiveInteger
Source§impl Div<u32> for NonPositiveInteger
impl Div<u32> for NonPositiveInteger
Source§impl Div<u64> for NonPositiveInteger
impl Div<u64> for NonPositiveInteger
Source§impl Div<u8> for NonPositiveInteger
impl Div<u8> for NonPositiveInteger
Source§impl Div<usize> for NonPositiveInteger
impl Div<usize> for NonPositiveInteger
Source§impl Div for NonPositiveInteger
impl Div for NonPositiveInteger
Source§type Output = NonPositiveInteger
type Output = NonPositiveInteger
The resulting type after applying the
/
operator.Source§impl<'a> From<&'a NonPositiveInteger> for NonPositiveInteger
impl<'a> From<&'a NonPositiveInteger> for NonPositiveInteger
Source§fn from(value: &'a NonPositiveInteger) -> Self
fn from(value: &'a NonPositiveInteger) -> Self
Converts to this type from the input type.
Source§impl From<NonPositiveInteger> for BigInt
impl From<NonPositiveInteger> for BigInt
Source§fn from(value: NonPositiveInteger) -> Self
fn from(value: NonPositiveInteger) -> Self
Converts to this type from the input type.
Source§impl From<NonPositiveIntegerBuf> for NonPositiveInteger
impl From<NonPositiveIntegerBuf> for NonPositiveInteger
Source§fn from(value: NonPositiveIntegerBuf) -> Self
fn from(value: NonPositiveIntegerBuf) -> Self
Converts to this type from the input type.
Source§impl FromStr for NonPositiveInteger
impl FromStr for NonPositiveInteger
Source§impl Hash for NonPositiveInteger
impl Hash for NonPositiveInteger
Source§impl LexicalFormOf<NonPositiveInteger> for NonPositiveInteger
impl LexicalFormOf<NonPositiveInteger> for NonPositiveInteger
type ValueError = Infallible
fn try_as_value(&self) -> Result<NonPositiveInteger, Self::ValueError>
fn as_value(&self) -> Vwhere
Self: LexicalFormOf<V, ValueError = Infallible>,
Source§impl Mul<Integer> for NonPositiveInteger
impl Mul<Integer> for NonPositiveInteger
Source§impl Mul<NegativeInteger> for NonPositiveInteger
impl Mul<NegativeInteger> for NonPositiveInteger
Source§type Output = NonPositiveInteger
type Output = NonPositiveInteger
The resulting type after applying the
*
operator.Source§impl Mul<NonNegativeInteger> for NonPositiveInteger
impl Mul<NonNegativeInteger> for NonPositiveInteger
Source§type Output = NonPositiveInteger
type Output = NonPositiveInteger
The resulting type after applying the
*
operator.Source§impl Mul<NonPositiveInteger> for NegativeInteger
impl Mul<NonPositiveInteger> for NegativeInteger
Source§type Output = NegativeInteger
type Output = NegativeInteger
The resulting type after applying the
*
operator.Source§impl Mul<NonPositiveInteger> for NonNegativeInteger
impl Mul<NonPositiveInteger> for NonNegativeInteger
Source§type Output = NonNegativeInteger
type Output = NonNegativeInteger
The resulting type after applying the
*
operator.Source§impl Mul<NonPositiveInteger> for PositiveInteger
impl Mul<NonPositiveInteger> for PositiveInteger
Source§type Output = PositiveInteger
type Output = PositiveInteger
The resulting type after applying the
*
operator.Source§impl Mul<PositiveInteger> for NonPositiveInteger
impl Mul<PositiveInteger> for NonPositiveInteger
Source§type Output = NonPositiveInteger
type Output = NonPositiveInteger
The resulting type after applying the
*
operator.Source§impl Mul<i16> for NonPositiveInteger
impl Mul<i16> for NonPositiveInteger
Source§impl Mul<i32> for NonPositiveInteger
impl Mul<i32> for NonPositiveInteger
Source§impl Mul<i64> for NonPositiveInteger
impl Mul<i64> for NonPositiveInteger
Source§impl Mul<i8> for NonPositiveInteger
impl Mul<i8> for NonPositiveInteger
Source§impl Mul<isize> for NonPositiveInteger
impl Mul<isize> for NonPositiveInteger
Source§impl Mul<u16> for NonPositiveInteger
impl Mul<u16> for NonPositiveInteger
Source§impl Mul<u32> for NonPositiveInteger
impl Mul<u32> for NonPositiveInteger
Source§impl Mul<u64> for NonPositiveInteger
impl Mul<u64> for NonPositiveInteger
Source§impl Mul<u8> for NonPositiveInteger
impl Mul<u8> for NonPositiveInteger
Source§impl Mul<usize> for NonPositiveInteger
impl Mul<usize> for NonPositiveInteger
Source§impl Mul for NonPositiveInteger
impl Mul for NonPositiveInteger
Source§type Output = NonPositiveInteger
type Output = NonPositiveInteger
The resulting type after applying the
*
operator.Source§impl Ord for NonPositiveInteger
impl Ord for NonPositiveInteger
Source§fn cmp(&self, other: &NonPositiveInteger) -> Ordering
fn cmp(&self, other: &NonPositiveInteger) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl ParseXsd for NonPositiveInteger
impl ParseXsd for NonPositiveInteger
type LexicalForm = NonPositiveInteger
fn parse_xsd(lexical_value: &str) -> ParseXsdResult<Self, Self::LexicalForm>
Source§impl PartialEq for NonPositiveInteger
impl PartialEq for NonPositiveInteger
Source§impl PartialOrd for NonPositiveInteger
impl PartialOrd for NonPositiveInteger
Source§impl Sub<Integer> for NonPositiveInteger
impl Sub<Integer> for NonPositiveInteger
Source§impl Sub<NegativeInteger> for NonPositiveInteger
impl Sub<NegativeInteger> for NonPositiveInteger
Source§type Output = NonPositiveInteger
type Output = NonPositiveInteger
The resulting type after applying the
-
operator.Source§impl Sub<NonNegativeInteger> for NonPositiveInteger
impl Sub<NonNegativeInteger> for NonPositiveInteger
Source§type Output = NonPositiveInteger
type Output = NonPositiveInteger
The resulting type after applying the
-
operator.Source§impl Sub<NonPositiveInteger> for NegativeInteger
impl Sub<NonPositiveInteger> for NegativeInteger
Source§type Output = NegativeInteger
type Output = NegativeInteger
The resulting type after applying the
-
operator.Source§impl Sub<NonPositiveInteger> for NonNegativeInteger
impl Sub<NonPositiveInteger> for NonNegativeInteger
Source§type Output = NonNegativeInteger
type Output = NonNegativeInteger
The resulting type after applying the
-
operator.Source§impl Sub<NonPositiveInteger> for PositiveInteger
impl Sub<NonPositiveInteger> for PositiveInteger
Source§type Output = PositiveInteger
type Output = PositiveInteger
The resulting type after applying the
-
operator.Source§impl Sub<PositiveInteger> for NonPositiveInteger
impl Sub<PositiveInteger> for NonPositiveInteger
Source§type Output = NonPositiveInteger
type Output = NonPositiveInteger
The resulting type after applying the
-
operator.Source§impl Sub<i16> for NonPositiveInteger
impl Sub<i16> for NonPositiveInteger
Source§impl Sub<i32> for NonPositiveInteger
impl Sub<i32> for NonPositiveInteger
Source§impl Sub<i64> for NonPositiveInteger
impl Sub<i64> for NonPositiveInteger
Source§impl Sub<i8> for NonPositiveInteger
impl Sub<i8> for NonPositiveInteger
Source§impl Sub<isize> for NonPositiveInteger
impl Sub<isize> for NonPositiveInteger
Source§impl Sub<u16> for NonPositiveInteger
impl Sub<u16> for NonPositiveInteger
Source§impl Sub<u32> for NonPositiveInteger
impl Sub<u32> for NonPositiveInteger
Source§impl Sub<u64> for NonPositiveInteger
impl Sub<u64> for NonPositiveInteger
Source§impl Sub<u8> for NonPositiveInteger
impl Sub<u8> for NonPositiveInteger
Source§impl Sub<usize> for NonPositiveInteger
impl Sub<usize> for NonPositiveInteger
Source§impl Sub for NonPositiveInteger
impl Sub for NonPositiveInteger
Source§type Output = NonPositiveInteger
type Output = NonPositiveInteger
The resulting type after applying the
-
operator.Source§impl TryFrom<Integer> for NonPositiveInteger
impl TryFrom<Integer> for NonPositiveInteger
Source§impl TryFrom<NonPositiveInteger> for i16
impl TryFrom<NonPositiveInteger> for i16
Source§type Error = NonPositiveIntegerOutOfTargetBounds
type Error = NonPositiveIntegerOutOfTargetBounds
The type returned in the event of a conversion error.
Source§impl TryFrom<NonPositiveInteger> for i32
impl TryFrom<NonPositiveInteger> for i32
Source§type Error = NonPositiveIntegerOutOfTargetBounds
type Error = NonPositiveIntegerOutOfTargetBounds
The type returned in the event of a conversion error.
Source§impl TryFrom<NonPositiveInteger> for i64
impl TryFrom<NonPositiveInteger> for i64
Source§type Error = NonPositiveIntegerOutOfTargetBounds
type Error = NonPositiveIntegerOutOfTargetBounds
The type returned in the event of a conversion error.
Source§impl TryFrom<NonPositiveInteger> for i8
impl TryFrom<NonPositiveInteger> for i8
Source§type Error = NonPositiveIntegerOutOfTargetBounds
type Error = NonPositiveIntegerOutOfTargetBounds
The type returned in the event of a conversion error.
Source§impl TryFrom<NonPositiveInteger> for isize
impl TryFrom<NonPositiveInteger> for isize
Source§type Error = NonPositiveIntegerOutOfTargetBounds
type Error = NonPositiveIntegerOutOfTargetBounds
The type returned in the event of a conversion error.
Source§impl TryFrom<NonPositiveInteger> for u16
impl TryFrom<NonPositiveInteger> for u16
Source§type Error = NonPositiveIntegerOutOfTargetBounds
type Error = NonPositiveIntegerOutOfTargetBounds
The type returned in the event of a conversion error.
Source§impl TryFrom<NonPositiveInteger> for u32
impl TryFrom<NonPositiveInteger> for u32
Source§type Error = NonPositiveIntegerOutOfTargetBounds
type Error = NonPositiveIntegerOutOfTargetBounds
The type returned in the event of a conversion error.
Source§impl TryFrom<NonPositiveInteger> for u64
impl TryFrom<NonPositiveInteger> for u64
Source§type Error = NonPositiveIntegerOutOfTargetBounds
type Error = NonPositiveIntegerOutOfTargetBounds
The type returned in the event of a conversion error.
Source§impl TryFrom<NonPositiveInteger> for u8
impl TryFrom<NonPositiveInteger> for u8
Source§type Error = NonPositiveIntegerOutOfTargetBounds
type Error = NonPositiveIntegerOutOfTargetBounds
The type returned in the event of a conversion error.
Source§impl TryFrom<NonPositiveInteger> for usize
impl TryFrom<NonPositiveInteger> for usize
Source§type Error = NonPositiveIntegerOutOfTargetBounds
type Error = NonPositiveIntegerOutOfTargetBounds
The type returned in the event of a conversion error.
Source§impl XsdValue for NonPositiveInteger
impl XsdValue for NonPositiveInteger
impl Eq for NonPositiveInteger
impl StructuralPartialEq for NonPositiveInteger
Auto Trait Implementations§
impl Freeze for NonPositiveInteger
impl RefUnwindSafe for NonPositiveInteger
impl Send for NonPositiveInteger
impl Sync for NonPositiveInteger
impl Unpin for NonPositiveInteger
impl UnwindSafe for NonPositiveInteger
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