pub struct Integer(/* private fields */);Expand description
Integer number.
Implementations§
Source§impl Integer
impl Integer
Sourcepub fn from_bigint_ref(n: &BigInt) -> &Self
pub fn from_bigint_ref(n: &BigInt) -> &Self
Converts a BigInt reference into an Integer reference.
Sourcepub fn from_bigint(n: BigInt) -> Self
pub fn from_bigint(n: BigInt) -> Self
Converts a BigInt into an Integer.
pub fn from_bytes_be(sign: Sign, bytes: &[u8]) -> Self
pub fn from_bytes_le(sign: Sign, bytes: &[u8]) -> Self
pub fn from_signed_bytes_be(bytes: &[u8]) -> Self
pub fn from_signed_bytes_le(bytes: &[u8]) -> Self
pub fn zero() -> Self
pub fn is_zero(&self) -> bool
pub fn is_positive(&self) -> bool
pub fn is_negative(&self) -> bool
pub fn integer_type(&self) -> IntegerDatatype
Sourcepub fn lexical_representation(&self) -> IntegerBuf
pub fn lexical_representation(&self) -> IntegerBuf
Returns a lexical representation of this 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 NegativeInteger
impl Add<Integer> for NegativeInteger
Source§impl Add<Integer> for NonNegativeInteger
impl Add<Integer> for NonNegativeInteger
Source§impl Add<Integer> for NonPositiveInteger
impl Add<Integer> for NonPositiveInteger
Source§impl Add<Integer> for PositiveInteger
impl Add<Integer> for PositiveInteger
Source§impl Div<Integer> for NegativeInteger
impl Div<Integer> for NegativeInteger
Source§impl Div<Integer> for NonNegativeInteger
impl Div<Integer> for NonNegativeInteger
Source§impl Div<Integer> for NonPositiveInteger
impl Div<Integer> for NonPositiveInteger
Source§impl Div<Integer> for PositiveInteger
impl Div<Integer> for PositiveInteger
Source§impl From<IntegerBuf> for Integer
impl From<IntegerBuf> for Integer
Source§fn from(value: IntegerBuf) -> Self
fn from(value: IntegerBuf) -> 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<NonPositiveIntegerBuf> for Integer
impl From<NonPositiveIntegerBuf> for Integer
Source§fn from(value: NonPositiveIntegerBuf) -> Self
fn from(value: NonPositiveIntegerBuf) -> Self
Converts to this type from the input type.
Source§impl LexicalFormOf<Integer> for Integer
impl LexicalFormOf<Integer> for Integer
type ValueError = Infallible
fn try_as_value(&self) -> Result<Integer, Self::ValueError>
fn as_value(&self) -> Vwhere
Self: LexicalFormOf<V, ValueError = Infallible>,
Source§impl Mul<Integer> for NegativeInteger
impl Mul<Integer> for NegativeInteger
Source§impl Mul<Integer> for NonNegativeInteger
impl Mul<Integer> for NonNegativeInteger
Source§impl Mul<Integer> for NonPositiveInteger
impl Mul<Integer> for NonPositiveInteger
Source§impl Mul<Integer> for PositiveInteger
impl Mul<Integer> for PositiveInteger
Source§impl Ord for Integer
impl Ord for Integer
Source§impl ParseXsd for Integer
impl ParseXsd for Integer
type LexicalForm = Integer
fn parse_xsd(lexical_value: &str) -> ParseXsdResult<Self, Self::LexicalForm>
Source§impl PartialOrd for Integer
impl PartialOrd for Integer
Source§impl Sub<Integer> for NegativeInteger
impl Sub<Integer> for NegativeInteger
Source§impl Sub<Integer> for NonNegativeInteger
impl Sub<Integer> for NonNegativeInteger
Source§impl Sub<Integer> for NonPositiveInteger
impl Sub<Integer> for NonPositiveInteger
Source§impl Sub<Integer> for PositiveInteger
impl Sub<Integer> for PositiveInteger
Source§impl TryFrom<Integer> for NonNegativeInteger
impl TryFrom<Integer> for NonNegativeInteger
Source§impl TryFrom<Integer> for NonPositiveInteger
impl TryFrom<Integer> for NonPositiveInteger
impl Eq for Integer
impl StructuralPartialEq for Integer
Auto Trait Implementations§
impl Freeze for Integer
impl RefUnwindSafe for Integer
impl Send for Integer
impl Sync for Integer
impl Unpin for Integer
impl UnwindSafe for Integer
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)