Struct xsd_types::value::Integer

source ·
#[repr(transparent)]
pub struct Integer(_);
Expand description

Integer number.

Implementations§

source§

impl Integer

source

pub fn from_bigint_ref(n: &BigInt) -> &Self

Converts a BigInt reference into an Integer reference.

source

pub fn from_bytes_be(sign: Sign, bytes: &[u8]) -> Self

source

pub fn from_bytes_le(sign: Sign, bytes: &[u8]) -> Self

source

pub fn from_signed_bytes_be(bytes: &[u8]) -> Self

source

pub fn from_signed_bytes_le(bytes: &[u8]) -> Self

source

pub fn zero() -> Self

source

pub fn is_zero(&self) -> bool

source

pub fn is_positive(&self) -> bool

source

pub fn is_negative(&self) -> bool

source

pub fn integer_type(&self) -> Option<IntegerDatatype>

source

pub fn lexical_representation(&self) -> IntegerBuf

Returns a lexical representation of this integer.

source

pub fn to_bytes_be(&self) -> (Sign, Vec<u8>)

source

pub fn to_bytes_le(&self) -> (Sign, Vec<u8>)

source

pub fn to_signed_bytes_be(&self) -> Vec<u8>

source

pub fn to_signed_bytes_le(&self) -> Vec<u8>

Trait Implementations§

source§

impl Add<Integer> for Integer

§

type Output = Integer

The resulting type after applying the + operator.
source§

fn add(self, rhs: Integer) -> Self::Output

Performs the + operation. Read more
source§

impl Add<Integer> for NegativeInteger

§

type Output = NegativeInteger

The resulting type after applying the + operator.
source§

fn add(self, rhs: Integer) -> Self::Output

Performs the + operation. Read more
source§

impl Add<Integer> for NonNegativeInteger

§

type Output = NonNegativeInteger

The resulting type after applying the + operator.
source§

fn add(self, rhs: Integer) -> Self::Output

Performs the + operation. Read more
source§

impl Add<Integer> for NonPositiveInteger

§

type Output = NonPositiveInteger

The resulting type after applying the + operator.
source§

fn add(self, rhs: Integer) -> Self::Output

Performs the + operation. Read more
source§

impl Add<Integer> for PositiveInteger

§

type Output = PositiveInteger

The resulting type after applying the + operator.
source§

fn add(self, rhs: Integer) -> Self::Output

Performs the + operation. Read more
source§

impl Add<i16> for Integer

§

type Output = Integer

The resulting type after applying the + operator.
source§

fn add(self, rhs: i16) -> Self::Output

Performs the + operation. Read more
source§

impl Add<i32> for Integer

§

type Output = Integer

The resulting type after applying the + operator.
source§

fn add(self, rhs: i32) -> Self::Output

Performs the + operation. Read more
source§

impl Add<i64> for Integer

§

type Output = Integer

The resulting type after applying the + operator.
source§

fn add(self, rhs: i64) -> Self::Output

Performs the + operation. Read more
source§

impl Add<i8> for Integer

§

type Output = Integer

The resulting type after applying the + operator.
source§

fn add(self, rhs: i8) -> Self::Output

Performs the + operation. Read more
source§

impl Add<isize> for Integer

§

type Output = Integer

The resulting type after applying the + operator.
source§

fn add(self, rhs: isize) -> Self::Output

Performs the + operation. Read more
source§

impl Add<u16> for Integer

§

type Output = Integer

The resulting type after applying the + operator.
source§

fn add(self, rhs: u16) -> Self::Output

Performs the + operation. Read more
source§

impl Add<u32> for Integer

§

type Output = Integer

The resulting type after applying the + operator.
source§

fn add(self, rhs: u32) -> Self::Output

Performs the + operation. Read more
source§

impl Add<u64> for Integer

§

type Output = Integer

The resulting type after applying the + operator.
source§

fn add(self, rhs: u64) -> Self::Output

Performs the + operation. Read more
source§

impl Add<u8> for Integer

§

type Output = Integer

The resulting type after applying the + operator.
source§

fn add(self, rhs: u8) -> Self::Output

Performs the + operation. Read more
source§

impl Add<usize> for Integer

§

type Output = Integer

The resulting type after applying the + operator.
source§

fn add(self, rhs: usize) -> Self::Output

Performs the + operation. Read more
source§

impl AsRef<BigInt> for Integer

source§

fn as_ref(&self) -> &BigInt

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl Borrow<BigInt> for Integer

source§

fn borrow(&self) -> &BigInt

Immutably borrows from an owned value. Read more
source§

impl Clone for Integer

source§

fn clone(&self) -> Integer

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Integer

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Display for Integer

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Div<Integer> for Integer

§

type Output = Integer

The resulting type after applying the / operator.
source§

fn div(self, rhs: Integer) -> Self::Output

Performs the / operation. Read more
source§

impl Div<Integer> for NegativeInteger

§

type Output = NegativeInteger

The resulting type after applying the / operator.
source§

fn div(self, rhs: Integer) -> Self::Output

Performs the / operation. Read more
source§

impl Div<Integer> for NonNegativeInteger

§

type Output = NonNegativeInteger

The resulting type after applying the / operator.
source§

fn div(self, rhs: Integer) -> Self::Output

Performs the / operation. Read more
source§

impl Div<Integer> for NonPositiveInteger

§

type Output = NonPositiveInteger

The resulting type after applying the / operator.
source§

fn div(self, rhs: Integer) -> Self::Output

Performs the / operation. Read more
source§

impl Div<Integer> for PositiveInteger

§

type Output = PositiveInteger

The resulting type after applying the / operator.
source§

fn div(self, rhs: Integer) -> Self::Output

Performs the / operation. Read more
source§

impl Div<i16> for Integer

§

type Output = Integer

The resulting type after applying the / operator.
source§

fn div(self, rhs: i16) -> Self::Output

Performs the / operation. Read more
source§

impl Div<i32> for Integer

§

type Output = Integer

The resulting type after applying the / operator.
source§

fn div(self, rhs: i32) -> Self::Output

Performs the / operation. Read more
source§

impl Div<i64> for Integer

§

type Output = Integer

The resulting type after applying the / operator.
source§

fn div(self, rhs: i64) -> Self::Output

Performs the / operation. Read more
source§

impl Div<i8> for Integer

§

type Output = Integer

The resulting type after applying the / operator.
source§

fn div(self, rhs: i8) -> Self::Output

Performs the / operation. Read more
source§

impl Div<isize> for Integer

§

type Output = Integer

The resulting type after applying the / operator.
source§

fn div(self, rhs: isize) -> Self::Output

Performs the / operation. Read more
source§

impl Div<u16> for Integer

§

type Output = Integer

The resulting type after applying the / operator.
source§

fn div(self, rhs: u16) -> Self::Output

Performs the / operation. Read more
source§

impl Div<u32> for Integer

§

type Output = Integer

The resulting type after applying the / operator.
source§

fn div(self, rhs: u32) -> Self::Output

Performs the / operation. Read more
source§

impl Div<u64> for Integer

§

type Output = Integer

The resulting type after applying the / operator.
source§

fn div(self, rhs: u64) -> Self::Output

Performs the / operation. Read more
source§

impl Div<u8> for Integer

§

type Output = Integer

The resulting type after applying the / operator.
source§

fn div(self, rhs: u8) -> Self::Output

Performs the / operation. Read more
source§

impl Div<usize> for Integer

§

type Output = Integer

The resulting type after applying the / operator.
source§

fn div(self, rhs: usize) -> Self::Output

Performs the / operation. Read more
source§

impl<'a> From<&'a Integer> for Integer

source§

fn from(value: &'a Integer) -> Self

Converts to this type from the input type.
source§

impl From<BigInt> for Integer

source§

fn from(value: BigInt) -> Self

Converts to this type from the input type.
source§

impl From<Integer> for BigInt

source§

fn from(value: Integer) -> Self

Converts to this type from the input type.
source§

impl From<Integer> for Decimal

source§

fn from(value: Integer) -> Self

Converts to this type from the input type.
source§

impl From<IntegerBuf> for Integer

source§

fn from(value: IntegerBuf) -> Self

Converts to this type from the input type.
source§

impl From<NonNegativeInteger> for Integer

source§

fn from(value: NonNegativeInteger) -> Self

Converts to this type from the input type.
source§

impl From<NonPositiveIntegerBuf> for Integer

source§

fn from(value: NonPositiveIntegerBuf) -> Self

Converts to this type from the input type.
source§

impl From<i16> for Integer

source§

fn from(value: i16) -> Self

Converts to this type from the input type.
source§

impl From<i32> for Integer

source§

fn from(value: i32) -> Self

Converts to this type from the input type.
source§

impl From<i64> for Integer

source§

fn from(value: i64) -> Self

Converts to this type from the input type.
source§

impl From<i8> for Integer

source§

fn from(value: i8) -> Self

Converts to this type from the input type.
source§

impl From<isize> for Integer

source§

fn from(value: isize) -> Self

Converts to this type from the input type.
source§

impl From<u16> for Integer

source§

fn from(value: u16) -> Self

Converts to this type from the input type.
source§

impl From<u32> for Integer

source§

fn from(value: u32) -> Self

Converts to this type from the input type.
source§

impl From<u64> for Integer

source§

fn from(value: u64) -> Self

Converts to this type from the input type.
source§

impl From<u8> for Integer

source§

fn from(value: u8) -> Self

Converts to this type from the input type.
source§

impl From<usize> for Integer

source§

fn from(value: usize) -> Self

Converts to this type from the input type.
source§

impl FromStr for Integer

§

type Err = InvalidInteger

The associated error which can be returned from parsing.
source§

fn from_str(s: &str) -> Result<Self, Self::Err>

Parses a string s to return a value of this type. Read more
source§

impl Hash for Integer

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl LexicalFormOf<Integer> for Integer

source§

impl Mul<Integer> for Integer

§

type Output = Integer

The resulting type after applying the * operator.
source§

fn mul(self, rhs: Integer) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<Integer> for NegativeInteger

§

type Output = NegativeInteger

The resulting type after applying the * operator.
source§

fn mul(self, rhs: Integer) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<Integer> for NonNegativeInteger

§

type Output = NonNegativeInteger

The resulting type after applying the * operator.
source§

fn mul(self, rhs: Integer) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<Integer> for NonPositiveInteger

§

type Output = NonPositiveInteger

The resulting type after applying the * operator.
source§

fn mul(self, rhs: Integer) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<Integer> for PositiveInteger

§

type Output = PositiveInteger

The resulting type after applying the * operator.
source§

fn mul(self, rhs: Integer) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<i16> for Integer

§

type Output = Integer

The resulting type after applying the * operator.
source§

fn mul(self, rhs: i16) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<i32> for Integer

§

type Output = Integer

The resulting type after applying the * operator.
source§

fn mul(self, rhs: i32) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<i64> for Integer

§

type Output = Integer

The resulting type after applying the * operator.
source§

fn mul(self, rhs: i64) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<i8> for Integer

§

type Output = Integer

The resulting type after applying the * operator.
source§

fn mul(self, rhs: i8) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<isize> for Integer

§

type Output = Integer

The resulting type after applying the * operator.
source§

fn mul(self, rhs: isize) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<u16> for Integer

§

type Output = Integer

The resulting type after applying the * operator.
source§

fn mul(self, rhs: u16) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<u32> for Integer

§

type Output = Integer

The resulting type after applying the * operator.
source§

fn mul(self, rhs: u32) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<u64> for Integer

§

type Output = Integer

The resulting type after applying the * operator.
source§

fn mul(self, rhs: u64) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<u8> for Integer

§

type Output = Integer

The resulting type after applying the * operator.
source§

fn mul(self, rhs: u8) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<usize> for Integer

§

type Output = Integer

The resulting type after applying the * operator.
source§

fn mul(self, rhs: usize) -> Self::Output

Performs the * operation. Read more
source§

impl Ord for Integer

source§

fn cmp(&self, other: &Integer) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Selfwhere Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Selfwhere Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Selfwhere Self: Sized + PartialOrd<Self>,

Restrict a value to a certain interval. Read more
source§

impl ParseRdf for Integer

§

type LexicalForm = Integer

source§

fn parse_rdf(lexical_value: &str) -> ParseRdfResult<Self, Self::LexicalForm>

source§

impl PartialEq<Integer> for Integer

source§

fn eq(&self, other: &Integer) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd<Integer> for Integer

source§

fn partial_cmp(&self, other: &Integer) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

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 more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl Sub<Integer> for Integer

§

type Output = Integer

The resulting type after applying the - operator.
source§

fn sub(self, rhs: Integer) -> Self::Output

Performs the - operation. Read more
source§

impl Sub<Integer> for NegativeInteger

§

type Output = NegativeInteger

The resulting type after applying the - operator.
source§

fn sub(self, rhs: Integer) -> Self::Output

Performs the - operation. Read more
source§

impl Sub<Integer> for NonNegativeInteger

§

type Output = NonNegativeInteger

The resulting type after applying the - operator.
source§

fn sub(self, rhs: Integer) -> Self::Output

Performs the - operation. Read more
source§

impl Sub<Integer> for NonPositiveInteger

§

type Output = NonPositiveInteger

The resulting type after applying the - operator.
source§

fn sub(self, rhs: Integer) -> Self::Output

Performs the - operation. Read more
source§

impl Sub<Integer> for PositiveInteger

§

type Output = PositiveInteger

The resulting type after applying the - operator.
source§

fn sub(self, rhs: Integer) -> Self::Output

Performs the - operation. Read more
source§

impl Sub<i16> for Integer

§

type Output = Integer

The resulting type after applying the - operator.
source§

fn sub(self, rhs: i16) -> Self::Output

Performs the - operation. Read more
source§

impl Sub<i32> for Integer

§

type Output = Integer

The resulting type after applying the - operator.
source§

fn sub(self, rhs: i32) -> Self::Output

Performs the - operation. Read more
source§

impl Sub<i64> for Integer

§

type Output = Integer

The resulting type after applying the - operator.
source§

fn sub(self, rhs: i64) -> Self::Output

Performs the - operation. Read more
source§

impl Sub<i8> for Integer

§

type Output = Integer

The resulting type after applying the - operator.
source§

fn sub(self, rhs: i8) -> Self::Output

Performs the - operation. Read more
source§

impl Sub<isize> for Integer

§

type Output = Integer

The resulting type after applying the - operator.
source§

fn sub(self, rhs: isize) -> Self::Output

Performs the - operation. Read more
source§

impl Sub<u16> for Integer

§

type Output = Integer

The resulting type after applying the - operator.
source§

fn sub(self, rhs: u16) -> Self::Output

Performs the - operation. Read more
source§

impl Sub<u32> for Integer

§

type Output = Integer

The resulting type after applying the - operator.
source§

fn sub(self, rhs: u32) -> Self::Output

Performs the - operation. Read more
source§

impl Sub<u64> for Integer

§

type Output = Integer

The resulting type after applying the - operator.
source§

fn sub(self, rhs: u64) -> Self::Output

Performs the - operation. Read more
source§

impl Sub<u8> for Integer

§

type Output = Integer

The resulting type after applying the - operator.
source§

fn sub(self, rhs: u8) -> Self::Output

Performs the - operation. Read more
source§

impl Sub<usize> for Integer

§

type Output = Integer

The resulting type after applying the - operator.
source§

fn sub(self, rhs: usize) -> Self::Output

Performs the - operation. Read more
source§

impl TryFrom<Integer> for NonNegativeInteger

§

type Error = IntegerIsNegative

The type returned in the event of a conversion error.
source§

fn try_from(value: Integer) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Integer> for NonPositiveInteger

§

type Error = IntegerIsPositive

The type returned in the event of a conversion error.
source§

fn try_from(value: Integer) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Integer> for i16

§

type Error = IntegerOutOfTargetBounds

The type returned in the event of a conversion error.
source§

fn try_from(value: Integer) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Integer> for i32

§

type Error = IntegerOutOfTargetBounds

The type returned in the event of a conversion error.
source§

fn try_from(value: Integer) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Integer> for i64

§

type Error = IntegerOutOfTargetBounds

The type returned in the event of a conversion error.
source§

fn try_from(value: Integer) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Integer> for i8

§

type Error = IntegerOutOfTargetBounds

The type returned in the event of a conversion error.
source§

fn try_from(value: Integer) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Integer> for isize

§

type Error = IntegerOutOfTargetBounds

The type returned in the event of a conversion error.
source§

fn try_from(value: Integer) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Integer> for u16

§

type Error = IntegerOutOfTargetBounds

The type returned in the event of a conversion error.
source§

fn try_from(value: Integer) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Integer> for u32

§

type Error = IntegerOutOfTargetBounds

The type returned in the event of a conversion error.
source§

fn try_from(value: Integer) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Integer> for u64

§

type Error = IntegerOutOfTargetBounds

The type returned in the event of a conversion error.
source§

fn try_from(value: Integer) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Integer> for u8

§

type Error = IntegerOutOfTargetBounds

The type returned in the event of a conversion error.
source§

fn try_from(value: Integer) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Integer> for usize

§

type Error = IntegerOutOfTargetBounds

The type returned in the event of a conversion error.
source§

fn try_from(value: Integer) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl XsdDatatype for Integer

source§

fn type_(&self) -> Datatype

Returns the XSD datatype that best describes the value.
source§

impl Eq for Integer

source§

impl StructuralEq for Integer

source§

impl StructuralPartialEq for Integer

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T> ToString for Twhere T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.