Struct xsd_types::value::NonPositiveInteger
source · 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
§type Output = NonPositiveInteger
type Output = NonPositiveInteger
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<NonPositiveInteger> for NegativeInteger
impl Add<NonPositiveInteger> for NegativeInteger
§type Output = NegativeInteger
type Output = NegativeInteger
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<NonPositiveInteger> for PositiveInteger
impl Add<NonPositiveInteger> for PositiveInteger
§type Output = PositiveInteger
type Output = PositiveInteger
The resulting type after applying the
+ operator.source§impl Add<PositiveInteger> for NonPositiveInteger
impl Add<PositiveInteger> for NonPositiveInteger
§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
§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 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 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
§type Output = NonPositiveInteger
type Output = NonPositiveInteger
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<NonPositiveInteger> for NegativeInteger
impl Div<NonPositiveInteger> for NegativeInteger
§type Output = NegativeInteger
type Output = NegativeInteger
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<NonPositiveInteger> for PositiveInteger
impl Div<NonPositiveInteger> for PositiveInteger
§type Output = PositiveInteger
type Output = PositiveInteger
The resulting type after applying the
/ operator.source§impl Div<PositiveInteger> for NonPositiveInteger
impl Div<PositiveInteger> for NonPositiveInteger
§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
§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>
source§impl Mul<Integer> for NonPositiveInteger
impl Mul<Integer> for NonPositiveInteger
source§impl Mul<NegativeInteger> for NonPositiveInteger
impl Mul<NegativeInteger> for NonPositiveInteger
§type Output = NonPositiveInteger
type Output = NonPositiveInteger
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<NonPositiveInteger> for NegativeInteger
impl Mul<NonPositiveInteger> for NegativeInteger
§type Output = NegativeInteger
type Output = NegativeInteger
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<NonPositiveInteger> for PositiveInteger
impl Mul<NonPositiveInteger> for PositiveInteger
§type Output = PositiveInteger
type Output = PositiveInteger
The resulting type after applying the
* operator.source§impl Mul<PositiveInteger> for NonPositiveInteger
impl Mul<PositiveInteger> for NonPositiveInteger
§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
§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§fn eq(&self, other: &NonPositiveInteger) -> bool
fn eq(&self, other: &NonPositiveInteger) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl PartialOrd for NonPositiveInteger
impl PartialOrd for NonPositiveInteger
source§fn partial_cmp(&self, other: &NonPositiveInteger) -> Option<Ordering>
fn partial_cmp(&self, other: &NonPositiveInteger) -> 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 NonPositiveInteger
impl Sub<Integer> for NonPositiveInteger
source§impl Sub<NegativeInteger> for NonPositiveInteger
impl Sub<NegativeInteger> for NonPositiveInteger
§type Output = NonPositiveInteger
type Output = NonPositiveInteger
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<NonPositiveInteger> for NegativeInteger
impl Sub<NonPositiveInteger> for NegativeInteger
§type Output = NegativeInteger
type Output = NegativeInteger
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<NonPositiveInteger> for PositiveInteger
impl Sub<NonPositiveInteger> for PositiveInteger
§type Output = PositiveInteger
type Output = PositiveInteger
The resulting type after applying the
- operator.source§impl Sub<PositiveInteger> for NonPositiveInteger
impl Sub<PositiveInteger> for NonPositiveInteger
§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
§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
§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
§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
§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
§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
§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
§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
§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
§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
§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
§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 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