pub struct PositiveInteger(/* private fields */);Implementations§
Source§impl PositiveInteger
impl PositiveInteger
Sourcepub unsafe fn new_unchecked(n: BigInt) -> Self
pub unsafe fn new_unchecked(n: BigInt) -> Self
Creates a new positive integer from the given BigInt.
§Safety
The input value must but a positive integer.
Sourcepub fn from_bytes_be(bytes: &[u8]) -> Self
pub fn from_bytes_be(bytes: &[u8]) -> Self
Creates a 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 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 positive integer from its unsigned big endian bytes representation.
§Safety
The represented number must be 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 positive integer from its unsigned little endian bytes representation.
§Safety
The represented number must be positive.
pub fn into_big_int(self) -> BigInt
pub fn is_one(&self) -> bool
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 PositiveInteger
impl Add<Integer> for PositiveInteger
Source§impl Add<NegativeInteger> for PositiveInteger
impl Add<NegativeInteger> for PositiveInteger
Source§type Output = PositiveInteger
type Output = PositiveInteger
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 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 NegativeInteger
impl Add<PositiveInteger> for NegativeInteger
Source§type Output = NegativeInteger
type Output = NegativeInteger
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<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 PositiveInteger
impl Add<i16> for PositiveInteger
Source§impl Add<i32> for PositiveInteger
impl Add<i32> for PositiveInteger
Source§impl Add<i64> for PositiveInteger
impl Add<i64> for PositiveInteger
Source§impl Add<i8> for PositiveInteger
impl Add<i8> for PositiveInteger
Source§impl Add<isize> for PositiveInteger
impl Add<isize> for PositiveInteger
Source§impl Add<u16> for PositiveInteger
impl Add<u16> for PositiveInteger
Source§impl Add<u32> for PositiveInteger
impl Add<u32> for PositiveInteger
Source§impl Add<u64> for PositiveInteger
impl Add<u64> for PositiveInteger
Source§impl Add<u8> for PositiveInteger
impl Add<u8> for PositiveInteger
Source§impl Add<usize> for PositiveInteger
impl Add<usize> for PositiveInteger
Source§impl Add for PositiveInteger
impl Add for PositiveInteger
Source§type Output = PositiveInteger
type Output = PositiveInteger
The resulting type after applying the
+ operator.Source§impl Clone for PositiveInteger
impl Clone for PositiveInteger
Source§fn clone(&self) -> PositiveInteger
fn clone(&self) -> PositiveInteger
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 PositiveInteger
impl Debug for PositiveInteger
Source§impl Display for PositiveInteger
impl Display for PositiveInteger
Source§impl Div<Integer> for PositiveInteger
impl Div<Integer> for PositiveInteger
Source§impl Div<NegativeInteger> for PositiveInteger
impl Div<NegativeInteger> for PositiveInteger
Source§type Output = PositiveInteger
type Output = PositiveInteger
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 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 NegativeInteger
impl Div<PositiveInteger> for NegativeInteger
Source§type Output = NegativeInteger
type Output = NegativeInteger
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<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 PositiveInteger
impl Div<i16> for PositiveInteger
Source§impl Div<i32> for PositiveInteger
impl Div<i32> for PositiveInteger
Source§impl Div<i64> for PositiveInteger
impl Div<i64> for PositiveInteger
Source§impl Div<i8> for PositiveInteger
impl Div<i8> for PositiveInteger
Source§impl Div<isize> for PositiveInteger
impl Div<isize> for PositiveInteger
Source§impl Div<u16> for PositiveInteger
impl Div<u16> for PositiveInteger
Source§impl Div<u32> for PositiveInteger
impl Div<u32> for PositiveInteger
Source§impl Div<u64> for PositiveInteger
impl Div<u64> for PositiveInteger
Source§impl Div<u8> for PositiveInteger
impl Div<u8> for PositiveInteger
Source§impl Div<usize> for PositiveInteger
impl Div<usize> for PositiveInteger
Source§impl Div for PositiveInteger
impl Div for PositiveInteger
Source§type Output = PositiveInteger
type Output = PositiveInteger
The resulting type after applying the
/ operator.Source§impl From<PositiveInteger> for BigInt
impl From<PositiveInteger> for BigInt
Source§fn from(value: PositiveInteger) -> Self
fn from(value: PositiveInteger) -> Self
Converts to this type from the input type.
Source§impl Hash for PositiveInteger
impl Hash for PositiveInteger
Source§impl LexicalFormOf<PositiveInteger> for PositiveInteger
impl LexicalFormOf<PositiveInteger> for PositiveInteger
type ValueError = Infallible
fn try_as_value(&self) -> Result<PositiveInteger, Self::ValueError>
fn as_value(&self) -> Vwhere
Self: LexicalFormOf<V, ValueError = Infallible>,
Source§impl Mul<Integer> for PositiveInteger
impl Mul<Integer> for PositiveInteger
Source§impl Mul<NegativeInteger> for PositiveInteger
impl Mul<NegativeInteger> for PositiveInteger
Source§type Output = PositiveInteger
type Output = PositiveInteger
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 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 NegativeInteger
impl Mul<PositiveInteger> for NegativeInteger
Source§type Output = NegativeInteger
type Output = NegativeInteger
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<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 PositiveInteger
impl Mul<i16> for PositiveInteger
Source§impl Mul<i32> for PositiveInteger
impl Mul<i32> for PositiveInteger
Source§impl Mul<i64> for PositiveInteger
impl Mul<i64> for PositiveInteger
Source§impl Mul<i8> for PositiveInteger
impl Mul<i8> for PositiveInteger
Source§impl Mul<isize> for PositiveInteger
impl Mul<isize> for PositiveInteger
Source§impl Mul<u16> for PositiveInteger
impl Mul<u16> for PositiveInteger
Source§impl Mul<u32> for PositiveInteger
impl Mul<u32> for PositiveInteger
Source§impl Mul<u64> for PositiveInteger
impl Mul<u64> for PositiveInteger
Source§impl Mul<u8> for PositiveInteger
impl Mul<u8> for PositiveInteger
Source§impl Mul<usize> for PositiveInteger
impl Mul<usize> for PositiveInteger
Source§impl Mul for PositiveInteger
impl Mul for PositiveInteger
Source§type Output = PositiveInteger
type Output = PositiveInteger
The resulting type after applying the
* operator.Source§impl Ord for PositiveInteger
impl Ord for PositiveInteger
Source§fn cmp(&self, other: &PositiveInteger) -> Ordering
fn cmp(&self, other: &PositiveInteger) -> 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 PositiveInteger
impl ParseXsd for PositiveInteger
type LexicalForm = PositiveInteger
fn parse_xsd(lexical_value: &str) -> ParseXsdResult<Self, Self::LexicalForm>
Source§impl PartialEq for PositiveInteger
impl PartialEq for PositiveInteger
Source§impl PartialOrd for PositiveInteger
impl PartialOrd for PositiveInteger
Source§impl Sub<Integer> for PositiveInteger
impl Sub<Integer> for PositiveInteger
Source§impl Sub<NegativeInteger> for PositiveInteger
impl Sub<NegativeInteger> for PositiveInteger
Source§type Output = PositiveInteger
type Output = PositiveInteger
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 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 NegativeInteger
impl Sub<PositiveInteger> for NegativeInteger
Source§type Output = NegativeInteger
type Output = NegativeInteger
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<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 PositiveInteger
impl Sub<i16> for PositiveInteger
Source§impl Sub<i32> for PositiveInteger
impl Sub<i32> for PositiveInteger
Source§impl Sub<i64> for PositiveInteger
impl Sub<i64> for PositiveInteger
Source§impl Sub<i8> for PositiveInteger
impl Sub<i8> for PositiveInteger
Source§impl Sub<isize> for PositiveInteger
impl Sub<isize> for PositiveInteger
Source§impl Sub<u16> for PositiveInteger
impl Sub<u16> for PositiveInteger
Source§impl Sub<u32> for PositiveInteger
impl Sub<u32> for PositiveInteger
Source§impl Sub<u64> for PositiveInteger
impl Sub<u64> for PositiveInteger
Source§impl Sub<u8> for PositiveInteger
impl Sub<u8> for PositiveInteger
Source§impl Sub<usize> for PositiveInteger
impl Sub<usize> for PositiveInteger
Source§impl Sub for PositiveInteger
impl Sub for PositiveInteger
Source§type Output = PositiveInteger
type Output = PositiveInteger
The resulting type after applying the
- operator.Source§impl XsdValue for PositiveInteger
impl XsdValue for PositiveInteger
impl Eq for PositiveInteger
impl StructuralPartialEq for PositiveInteger
Auto Trait Implementations§
impl Freeze for PositiveInteger
impl RefUnwindSafe for PositiveInteger
impl Send for PositiveInteger
impl Sync for PositiveInteger
impl Unpin for PositiveInteger
impl UnwindSafe for PositiveInteger
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