pub struct NonNegativeInteger(/* private fields */);Implementations§
Source§impl NonNegativeInteger
impl NonNegativeInteger
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 negative 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 negative 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 negative integer from its signed big endian bytes representation.
§Safety
The represented number must be non negative.
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 negative integer from its signed little endian bytes representation.
§Safety
The represented number must be non negative.
pub fn from_signed_bytes_be(bytes: &[u8]) -> Result<Self, IntegerIsNegative>
pub fn from_signed_bytes_le(bytes: &[u8]) -> Result<Self, IntegerIsNegative>
pub fn into_big_int(self) -> BigInt
pub fn zero() -> Self
pub fn is_zero(&self) -> bool
pub fn non_negative_integer_type(&self) -> NonNegativeIntegerDatatype
Sourcepub fn lexical_representation(&self) -> NonNegativeIntegerBuf
pub fn lexical_representation(&self) -> NonNegativeIntegerBuf
Returns a lexical representation of this non negative 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 NonNegativeInteger
impl Add<Integer> for NonNegativeInteger
Source§impl Add<NegativeInteger> for NonNegativeInteger
impl Add<NegativeInteger> for NonNegativeInteger
Source§type Output = NonNegativeInteger
type Output = NonNegativeInteger
The resulting type after applying the
+ operator.Source§impl Add<NonNegativeInteger> for NegativeInteger
impl Add<NonNegativeInteger> for NegativeInteger
Source§type Output = NegativeInteger
type Output = NegativeInteger
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<NonNegativeInteger> for PositiveInteger
impl Add<NonNegativeInteger> for PositiveInteger
Source§type Output = PositiveInteger
type Output = PositiveInteger
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<PositiveInteger> for NonNegativeInteger
impl Add<PositiveInteger> for NonNegativeInteger
Source§type Output = NonNegativeInteger
type Output = NonNegativeInteger
The resulting type after applying the
+ operator.Source§impl Add<i16> for NonNegativeInteger
impl Add<i16> for NonNegativeInteger
Source§impl Add<i32> for NonNegativeInteger
impl Add<i32> for NonNegativeInteger
Source§impl Add<i64> for NonNegativeInteger
impl Add<i64> for NonNegativeInteger
Source§impl Add<i8> for NonNegativeInteger
impl Add<i8> for NonNegativeInteger
Source§impl Add<isize> for NonNegativeInteger
impl Add<isize> for NonNegativeInteger
Source§impl Add<u16> for NonNegativeInteger
impl Add<u16> for NonNegativeInteger
Source§impl Add<u32> for NonNegativeInteger
impl Add<u32> for NonNegativeInteger
Source§impl Add<u64> for NonNegativeInteger
impl Add<u64> for NonNegativeInteger
Source§impl Add<u8> for NonNegativeInteger
impl Add<u8> for NonNegativeInteger
Source§impl Add<usize> for NonNegativeInteger
impl Add<usize> for NonNegativeInteger
Source§impl Add for NonNegativeInteger
impl Add for NonNegativeInteger
Source§type Output = NonNegativeInteger
type Output = NonNegativeInteger
The resulting type after applying the
+ operator.Source§impl AsRef<BigInt> for NonNegativeInteger
impl AsRef<BigInt> for NonNegativeInteger
Source§impl Borrow<BigInt> for NonNegativeInteger
impl Borrow<BigInt> for NonNegativeInteger
Source§impl Clone for NonNegativeInteger
impl Clone for NonNegativeInteger
Source§fn clone(&self) -> NonNegativeInteger
fn clone(&self) -> NonNegativeInteger
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 NonNegativeInteger
impl Debug for NonNegativeInteger
Source§impl Display for NonNegativeInteger
impl Display for NonNegativeInteger
Source§impl Div<Integer> for NonNegativeInteger
impl Div<Integer> for NonNegativeInteger
Source§impl Div<NegativeInteger> for NonNegativeInteger
impl Div<NegativeInteger> for NonNegativeInteger
Source§type Output = NonNegativeInteger
type Output = NonNegativeInteger
The resulting type after applying the
/ operator.Source§impl Div<NonNegativeInteger> for NegativeInteger
impl Div<NonNegativeInteger> for NegativeInteger
Source§type Output = NegativeInteger
type Output = NegativeInteger
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<NonNegativeInteger> for PositiveInteger
impl Div<NonNegativeInteger> for PositiveInteger
Source§type Output = PositiveInteger
type Output = PositiveInteger
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<PositiveInteger> for NonNegativeInteger
impl Div<PositiveInteger> for NonNegativeInteger
Source§type Output = NonNegativeInteger
type Output = NonNegativeInteger
The resulting type after applying the
/ operator.Source§impl Div<i16> for NonNegativeInteger
impl Div<i16> for NonNegativeInteger
Source§impl Div<i32> for NonNegativeInteger
impl Div<i32> for NonNegativeInteger
Source§impl Div<i64> for NonNegativeInteger
impl Div<i64> for NonNegativeInteger
Source§impl Div<i8> for NonNegativeInteger
impl Div<i8> for NonNegativeInteger
Source§impl Div<isize> for NonNegativeInteger
impl Div<isize> for NonNegativeInteger
Source§impl Div<u16> for NonNegativeInteger
impl Div<u16> for NonNegativeInteger
Source§impl Div<u32> for NonNegativeInteger
impl Div<u32> for NonNegativeInteger
Source§impl Div<u64> for NonNegativeInteger
impl Div<u64> for NonNegativeInteger
Source§impl Div<u8> for NonNegativeInteger
impl Div<u8> for NonNegativeInteger
Source§impl Div<usize> for NonNegativeInteger
impl Div<usize> for NonNegativeInteger
Source§impl Div for NonNegativeInteger
impl Div for NonNegativeInteger
Source§type Output = NonNegativeInteger
type Output = NonNegativeInteger
The resulting type after applying the
/ operator.Source§impl<'a> From<&'a NonNegativeInteger> for NonNegativeInteger
impl<'a> From<&'a NonNegativeInteger> for NonNegativeInteger
Source§fn from(value: &'a NonNegativeInteger) -> Self
fn from(value: &'a NonNegativeInteger) -> Self
Converts to this type from the input type.
Source§impl From<NonNegativeInteger> for BigInt
impl From<NonNegativeInteger> for BigInt
Source§fn from(value: NonNegativeInteger) -> Self
fn from(value: NonNegativeInteger) -> Self
Converts to this type from the input type.
Source§impl From<NonNegativeInteger> for Integer
impl From<NonNegativeInteger> for Integer
Source§fn from(value: NonNegativeInteger) -> Self
fn from(value: NonNegativeInteger) -> Self
Converts to this type from the input type.
Source§impl From<NonNegativeIntegerBuf> for NonNegativeInteger
impl From<NonNegativeIntegerBuf> for NonNegativeInteger
Source§fn from(value: NonNegativeIntegerBuf) -> Self
fn from(value: NonNegativeIntegerBuf) -> Self
Converts to this type from the input type.
Source§impl From<u16> for NonNegativeInteger
impl From<u16> for NonNegativeInteger
Source§impl From<u32> for NonNegativeInteger
impl From<u32> for NonNegativeInteger
Source§impl From<u64> for NonNegativeInteger
impl From<u64> for NonNegativeInteger
Source§impl From<u8> for NonNegativeInteger
impl From<u8> for NonNegativeInteger
Source§impl From<usize> for NonNegativeInteger
impl From<usize> for NonNegativeInteger
Source§impl FromStr for NonNegativeInteger
impl FromStr for NonNegativeInteger
Source§impl Hash for NonNegativeInteger
impl Hash for NonNegativeInteger
Source§impl LexicalFormOf<NonNegativeInteger> for NonNegativeInteger
impl LexicalFormOf<NonNegativeInteger> for NonNegativeInteger
type ValueError = Infallible
fn try_as_value(&self) -> Result<NonNegativeInteger, Self::ValueError>
fn as_value(&self) -> Vwhere
Self: LexicalFormOf<V, ValueError = Infallible>,
Source§impl Mul<Integer> for NonNegativeInteger
impl Mul<Integer> for NonNegativeInteger
Source§impl Mul<NegativeInteger> for NonNegativeInteger
impl Mul<NegativeInteger> for NonNegativeInteger
Source§type Output = NonNegativeInteger
type Output = NonNegativeInteger
The resulting type after applying the
* operator.Source§impl Mul<NonNegativeInteger> for NegativeInteger
impl Mul<NonNegativeInteger> for NegativeInteger
Source§type Output = NegativeInteger
type Output = NegativeInteger
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<NonNegativeInteger> for PositiveInteger
impl Mul<NonNegativeInteger> for PositiveInteger
Source§type Output = PositiveInteger
type Output = PositiveInteger
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<PositiveInteger> for NonNegativeInteger
impl Mul<PositiveInteger> for NonNegativeInteger
Source§type Output = NonNegativeInteger
type Output = NonNegativeInteger
The resulting type after applying the
* operator.Source§impl Mul<i16> for NonNegativeInteger
impl Mul<i16> for NonNegativeInteger
Source§impl Mul<i32> for NonNegativeInteger
impl Mul<i32> for NonNegativeInteger
Source§impl Mul<i64> for NonNegativeInteger
impl Mul<i64> for NonNegativeInteger
Source§impl Mul<i8> for NonNegativeInteger
impl Mul<i8> for NonNegativeInteger
Source§impl Mul<isize> for NonNegativeInteger
impl Mul<isize> for NonNegativeInteger
Source§impl Mul<u16> for NonNegativeInteger
impl Mul<u16> for NonNegativeInteger
Source§impl Mul<u32> for NonNegativeInteger
impl Mul<u32> for NonNegativeInteger
Source§impl Mul<u64> for NonNegativeInteger
impl Mul<u64> for NonNegativeInteger
Source§impl Mul<u8> for NonNegativeInteger
impl Mul<u8> for NonNegativeInteger
Source§impl Mul<usize> for NonNegativeInteger
impl Mul<usize> for NonNegativeInteger
Source§impl Mul for NonNegativeInteger
impl Mul for NonNegativeInteger
Source§type Output = NonNegativeInteger
type Output = NonNegativeInteger
The resulting type after applying the
* operator.Source§impl Ord for NonNegativeInteger
impl Ord for NonNegativeInteger
Source§fn cmp(&self, other: &NonNegativeInteger) -> Ordering
fn cmp(&self, other: &NonNegativeInteger) -> 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 NonNegativeInteger
impl ParseXsd for NonNegativeInteger
type LexicalForm = NonNegativeInteger
fn parse_xsd(lexical_value: &str) -> ParseXsdResult<Self, Self::LexicalForm>
Source§impl PartialEq for NonNegativeInteger
impl PartialEq for NonNegativeInteger
Source§impl PartialOrd for NonNegativeInteger
impl PartialOrd for NonNegativeInteger
Source§impl Sub<Integer> for NonNegativeInteger
impl Sub<Integer> for NonNegativeInteger
Source§impl Sub<NegativeInteger> for NonNegativeInteger
impl Sub<NegativeInteger> for NonNegativeInteger
Source§type Output = NonNegativeInteger
type Output = NonNegativeInteger
The resulting type after applying the
- operator.Source§impl Sub<NonNegativeInteger> for NegativeInteger
impl Sub<NonNegativeInteger> for NegativeInteger
Source§type Output = NegativeInteger
type Output = NegativeInteger
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<NonNegativeInteger> for PositiveInteger
impl Sub<NonNegativeInteger> for PositiveInteger
Source§type Output = PositiveInteger
type Output = PositiveInteger
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<PositiveInteger> for NonNegativeInteger
impl Sub<PositiveInteger> for NonNegativeInteger
Source§type Output = NonNegativeInteger
type Output = NonNegativeInteger
The resulting type after applying the
- operator.Source§impl Sub<i16> for NonNegativeInteger
impl Sub<i16> for NonNegativeInteger
Source§impl Sub<i32> for NonNegativeInteger
impl Sub<i32> for NonNegativeInteger
Source§impl Sub<i64> for NonNegativeInteger
impl Sub<i64> for NonNegativeInteger
Source§impl Sub<i8> for NonNegativeInteger
impl Sub<i8> for NonNegativeInteger
Source§impl Sub<isize> for NonNegativeInteger
impl Sub<isize> for NonNegativeInteger
Source§impl Sub<u16> for NonNegativeInteger
impl Sub<u16> for NonNegativeInteger
Source§impl Sub<u32> for NonNegativeInteger
impl Sub<u32> for NonNegativeInteger
Source§impl Sub<u64> for NonNegativeInteger
impl Sub<u64> for NonNegativeInteger
Source§impl Sub<u8> for NonNegativeInteger
impl Sub<u8> for NonNegativeInteger
Source§impl Sub<usize> for NonNegativeInteger
impl Sub<usize> for NonNegativeInteger
Source§impl Sub for NonNegativeInteger
impl Sub for NonNegativeInteger
Source§type Output = NonNegativeInteger
type Output = NonNegativeInteger
The resulting type after applying the
- operator.Source§impl TryFrom<Integer> for NonNegativeInteger
impl TryFrom<Integer> for NonNegativeInteger
Source§impl TryFrom<NonNegativeInteger> for i16
impl TryFrom<NonNegativeInteger> for i16
Source§type Error = NonNegativeIntegerOutOfTargetBounds
type Error = NonNegativeIntegerOutOfTargetBounds
The type returned in the event of a conversion error.
Source§impl TryFrom<NonNegativeInteger> for i32
impl TryFrom<NonNegativeInteger> for i32
Source§type Error = NonNegativeIntegerOutOfTargetBounds
type Error = NonNegativeIntegerOutOfTargetBounds
The type returned in the event of a conversion error.
Source§impl TryFrom<NonNegativeInteger> for i64
impl TryFrom<NonNegativeInteger> for i64
Source§type Error = NonNegativeIntegerOutOfTargetBounds
type Error = NonNegativeIntegerOutOfTargetBounds
The type returned in the event of a conversion error.
Source§impl TryFrom<NonNegativeInteger> for i8
impl TryFrom<NonNegativeInteger> for i8
Source§type Error = NonNegativeIntegerOutOfTargetBounds
type Error = NonNegativeIntegerOutOfTargetBounds
The type returned in the event of a conversion error.
Source§impl TryFrom<NonNegativeInteger> for isize
impl TryFrom<NonNegativeInteger> for isize
Source§type Error = NonNegativeIntegerOutOfTargetBounds
type Error = NonNegativeIntegerOutOfTargetBounds
The type returned in the event of a conversion error.
Source§impl TryFrom<NonNegativeInteger> for u16
impl TryFrom<NonNegativeInteger> for u16
Source§type Error = NonNegativeIntegerOutOfTargetBounds
type Error = NonNegativeIntegerOutOfTargetBounds
The type returned in the event of a conversion error.
Source§impl TryFrom<NonNegativeInteger> for u32
impl TryFrom<NonNegativeInteger> for u32
Source§type Error = NonNegativeIntegerOutOfTargetBounds
type Error = NonNegativeIntegerOutOfTargetBounds
The type returned in the event of a conversion error.
Source§impl TryFrom<NonNegativeInteger> for u64
impl TryFrom<NonNegativeInteger> for u64
Source§type Error = NonNegativeIntegerOutOfTargetBounds
type Error = NonNegativeIntegerOutOfTargetBounds
The type returned in the event of a conversion error.
Source§impl TryFrom<NonNegativeInteger> for u8
impl TryFrom<NonNegativeInteger> for u8
Source§type Error = NonNegativeIntegerOutOfTargetBounds
type Error = NonNegativeIntegerOutOfTargetBounds
The type returned in the event of a conversion error.
Source§impl TryFrom<NonNegativeInteger> for usize
impl TryFrom<NonNegativeInteger> for usize
Source§type Error = NonNegativeIntegerOutOfTargetBounds
type Error = NonNegativeIntegerOutOfTargetBounds
The type returned in the event of a conversion error.
Source§impl XsdValue for NonNegativeInteger
impl XsdValue for NonNegativeInteger
impl Eq for NonNegativeInteger
impl StructuralPartialEq for NonNegativeInteger
Auto Trait Implementations§
impl Freeze for NonNegativeInteger
impl RefUnwindSafe for NonNegativeInteger
impl Send for NonNegativeInteger
impl Sync for NonNegativeInteger
impl Unpin for NonNegativeInteger
impl UnwindSafe for NonNegativeInteger
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