Struct xsd_types::value::NonNegativeInteger
source · pub struct NonNegativeInteger(_);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) -> Option<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
§type Output = NonNegativeInteger
type Output = NonNegativeInteger
The resulting type after applying the
+ operator.source§impl Add<NonNegativeInteger> for NegativeInteger
impl Add<NonNegativeInteger> for NegativeInteger
§type Output = NegativeInteger
type Output = NegativeInteger
The resulting type after applying the
+ operator.source§impl Add<NonNegativeInteger> for NonNegativeInteger
impl Add<NonNegativeInteger> for NonNegativeInteger
§type Output = NonNegativeInteger
type Output = NonNegativeInteger
The resulting type after applying the
+ operator.source§impl Add<NonNegativeInteger> for NonPositiveInteger
impl Add<NonNegativeInteger> for NonPositiveInteger
§type Output = NonPositiveInteger
type Output = NonPositiveInteger
The resulting type after applying the
+ operator.source§impl Add<NonNegativeInteger> for PositiveInteger
impl Add<NonNegativeInteger> for PositiveInteger
§type Output = PositiveInteger
type Output = PositiveInteger
The resulting type after applying the
+ operator.source§impl Add<NonPositiveInteger> for NonNegativeInteger
impl Add<NonPositiveInteger> for NonNegativeInteger
§type Output = NonNegativeInteger
type Output = NonNegativeInteger
The resulting type after applying the
+ operator.source§impl Add<PositiveInteger> for NonNegativeInteger
impl Add<PositiveInteger> for NonNegativeInteger
§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 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 copy 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
§type Output = NonNegativeInteger
type Output = NonNegativeInteger
The resulting type after applying the
/ operator.source§impl Div<NonNegativeInteger> for NegativeInteger
impl Div<NonNegativeInteger> for NegativeInteger
§type Output = NegativeInteger
type Output = NegativeInteger
The resulting type after applying the
/ operator.source§impl Div<NonNegativeInteger> for NonNegativeInteger
impl Div<NonNegativeInteger> for NonNegativeInteger
§type Output = NonNegativeInteger
type Output = NonNegativeInteger
The resulting type after applying the
/ operator.source§impl Div<NonNegativeInteger> for NonPositiveInteger
impl Div<NonNegativeInteger> for NonPositiveInteger
§type Output = NonPositiveInteger
type Output = NonPositiveInteger
The resulting type after applying the
/ operator.source§impl Div<NonNegativeInteger> for PositiveInteger
impl Div<NonNegativeInteger> for PositiveInteger
§type Output = PositiveInteger
type Output = PositiveInteger
The resulting type after applying the
/ operator.source§impl Div<NonPositiveInteger> for NonNegativeInteger
impl Div<NonPositiveInteger> for NonNegativeInteger
§type Output = NonNegativeInteger
type Output = NonNegativeInteger
The resulting type after applying the
/ operator.source§impl Div<PositiveInteger> for NonNegativeInteger
impl Div<PositiveInteger> for NonNegativeInteger
§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<'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>
source§impl Mul<Integer> for NonNegativeInteger
impl Mul<Integer> for NonNegativeInteger
source§impl Mul<NegativeInteger> for NonNegativeInteger
impl Mul<NegativeInteger> for NonNegativeInteger
§type Output = NonNegativeInteger
type Output = NonNegativeInteger
The resulting type after applying the
* operator.source§impl Mul<NonNegativeInteger> for NegativeInteger
impl Mul<NonNegativeInteger> for NegativeInteger
§type Output = NegativeInteger
type Output = NegativeInteger
The resulting type after applying the
* operator.source§impl Mul<NonNegativeInteger> for NonNegativeInteger
impl Mul<NonNegativeInteger> for NonNegativeInteger
§type Output = NonNegativeInteger
type Output = NonNegativeInteger
The resulting type after applying the
* operator.source§impl Mul<NonNegativeInteger> for NonPositiveInteger
impl Mul<NonNegativeInteger> for NonPositiveInteger
§type Output = NonPositiveInteger
type Output = NonPositiveInteger
The resulting type after applying the
* operator.source§impl Mul<NonNegativeInteger> for PositiveInteger
impl Mul<NonNegativeInteger> for PositiveInteger
§type Output = PositiveInteger
type Output = PositiveInteger
The resulting type after applying the
* operator.source§impl Mul<NonPositiveInteger> for NonNegativeInteger
impl Mul<NonPositiveInteger> for NonNegativeInteger
§type Output = NonNegativeInteger
type Output = NonNegativeInteger
The resulting type after applying the
* operator.source§impl Mul<PositiveInteger> for NonNegativeInteger
impl Mul<PositiveInteger> for NonNegativeInteger
§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 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 ParseRdf for NonNegativeInteger
impl ParseRdf for NonNegativeInteger
type LexicalForm = NonNegativeInteger
fn parse_rdf(lexical_value: &str) -> ParseRdfResult<Self, Self::LexicalForm>
source§impl PartialEq<NonNegativeInteger> for NonNegativeInteger
impl PartialEq<NonNegativeInteger> for NonNegativeInteger
source§fn eq(&self, other: &NonNegativeInteger) -> bool
fn eq(&self, other: &NonNegativeInteger) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl PartialOrd<NonNegativeInteger> for NonNegativeInteger
impl PartialOrd<NonNegativeInteger> for NonNegativeInteger
source§fn partial_cmp(&self, other: &NonNegativeInteger) -> Option<Ordering>
fn partial_cmp(&self, other: &NonNegativeInteger) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self and other) and is used by the <=
operator. Read moresource§impl Sub<Integer> for NonNegativeInteger
impl Sub<Integer> for NonNegativeInteger
source§impl Sub<NegativeInteger> for NonNegativeInteger
impl Sub<NegativeInteger> for NonNegativeInteger
§type Output = NonNegativeInteger
type Output = NonNegativeInteger
The resulting type after applying the
- operator.source§impl Sub<NonNegativeInteger> for NegativeInteger
impl Sub<NonNegativeInteger> for NegativeInteger
§type Output = NegativeInteger
type Output = NegativeInteger
The resulting type after applying the
- operator.source§impl Sub<NonNegativeInteger> for NonNegativeInteger
impl Sub<NonNegativeInteger> for NonNegativeInteger
§type Output = NonNegativeInteger
type Output = NonNegativeInteger
The resulting type after applying the
- operator.source§impl Sub<NonNegativeInteger> for NonPositiveInteger
impl Sub<NonNegativeInteger> for NonPositiveInteger
§type Output = NonPositiveInteger
type Output = NonPositiveInteger
The resulting type after applying the
- operator.source§impl Sub<NonNegativeInteger> for PositiveInteger
impl Sub<NonNegativeInteger> for PositiveInteger
§type Output = PositiveInteger
type Output = PositiveInteger
The resulting type after applying the
- operator.source§impl Sub<NonPositiveInteger> for NonNegativeInteger
impl Sub<NonPositiveInteger> for NonNegativeInteger
§type Output = NonNegativeInteger
type Output = NonNegativeInteger
The resulting type after applying the
- operator.source§impl Sub<PositiveInteger> for NonNegativeInteger
impl Sub<PositiveInteger> for NonNegativeInteger
§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 TryFrom<Integer> for NonNegativeInteger
impl TryFrom<Integer> for NonNegativeInteger
source§impl TryFrom<NonNegativeInteger> for i16
impl TryFrom<NonNegativeInteger> for i16
§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
§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
§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
§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
§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
§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
§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
§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
§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
§type Error = NonNegativeIntegerOutOfTargetBounds
type Error = NonNegativeIntegerOutOfTargetBounds
The type returned in the event of a conversion error.
source§impl XsdDatatype for NonNegativeInteger
impl XsdDatatype for NonNegativeInteger
impl Eq for NonNegativeInteger
impl StructuralEq for NonNegativeInteger
impl StructuralPartialEq for NonNegativeInteger
Auto Trait Implementations§
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