[][src]Struct bigbit::linkedbytes::LBNum

pub struct LBNum(_);

A number in the Linked Bytes format, capable of storing arbitrarily large non-negative integers.

See the module-level documentation for more.

Methods

impl LBNum[src]

pub const ZERO: Self[src]

The zero value.

This does not allocate memory.

#[must_use]pub fn num_bytes(&self) -> usize[src]

The amount of bytes used in the number.

pub fn increment(&mut self)[src]

Increments the value.

pub fn decrement(&mut self)[src]

Decrements the value.

Panics

If the value was 0, a panic is produced. Use checked_decrement to properly handle such a situation.

pub fn make_zero(&mut self)[src]

Converts the number into 0 without deallocating memory.

This is useful for buffers used for converting a collection of primitive integers into derivatives of LBNum, namely in the FromIterator implementation of LBString.

pub fn checked_decrement(&mut self) -> bool[src]

Decrements the value, returning true if the decrement did anything and false if self was zero.

#[must_use]pub const fn inner(&self) -> &LBSequence[src]

Returns an immutable reference to the inner sequence.

Use this to locate bytes at arbitrary indicies.

#[must_use]pub fn into_inner(self) -> LBSequence[src]

Consumes the number and returns its inner sequence.

pub fn iter_le(
    &self
) -> impl Iterator<Item = LinkedByte> + DoubleEndedIterator + '_
[src]

Returns an iterator over the linked bytes, in little-endian byte order.

pub fn iter_be(
    &self
) -> impl Iterator<Item = LinkedByte> + DoubleEndedIterator + '_
[src]

Returns an iterator over the linked bytes, in big-endian byte order.

pub fn from_sequence(op: LBSequence) -> Self[src]

Creates an LBNum from an LBSequence, correcting any and all incorrect bytes into their valid state. Little-endian byte order is assumed, regardless of platform.

If any of the bytes except for the last one are endpoints (most significant bit cleared), they are converted into linked (most significant bit set), and if the last byte is linked, it's converted into and endpoint.

pub fn check_slice(op: &[LinkedByte]) -> bool[src]

Checks whether the operand is a compliant LB sequence.

See InvalidLBSequence for reasons why it might not be compliant.

pub fn fix_in_place(op: &mut [LinkedByte])[src]

Makes a slice of LinkedBytes suitable for storage in a HBNum by marking the last byte as an endpoint and the rest as linked ones.

impl LBNum[src]

pub fn checked_sub(self, rhs: &Self) -> Option<Self>[src]

Performs checked subtraction. Returns None if the result underflowed 0, or the result wrapped in Some otherwise.

impl LBNum[src]

pub fn into_string_with_radix(self, radix: u8) -> String[src]

Converts a Linked Bytes number into a string with an arbitrary radix (base), from 2 to 36 inclusively.

All alphabetic characters in the result are uppercase — use make_ascii_lowercase if you want LowerHex-style formatting.

Panics

Passing a radix less than 2 or greater than 36 results an immediate panic, even if the value is 0.

impl LBNum[src]

#[must_use = "this is an expensive non-in-place operation"]pub fn logb(self, base: LBNum) -> Self[src]

Consumes self and returns the logarithm of the given base.

Trait Implementations

impl<'_> Add<&'_ LBNum> for LBNum[src]

type Output = Self

The resulting type after applying the + operator.

impl Add<LBNum> for LBNum[src]

type Output = Self

The resulting type after applying the + operator.

impl Add<LBNum> for u8[src]

type Output = LBNum

The resulting type after applying the + operator.

impl Add<LBNum> for u16[src]

type Output = LBNum

The resulting type after applying the + operator.

impl Add<LBNum> for u32[src]

type Output = LBNum

The resulting type after applying the + operator.

impl Add<LBNum> for u64[src]

type Output = LBNum

The resulting type after applying the + operator.

impl Add<LBNum> for u128[src]

type Output = LBNum

The resulting type after applying the + operator.

impl Add<LBNum> for usize[src]

type Output = LBNum

The resulting type after applying the + operator.

impl<'_> Add<LBNumRef<'_>> for LBNum[src]

type Output = Self

The resulting type after applying the + operator.

impl Add<u128> for LBNum[src]

type Output = Self

The resulting type after applying the + operator.

impl Add<u16> for LBNum[src]

type Output = Self

The resulting type after applying the + operator.

impl Add<u32> for LBNum[src]

type Output = Self

The resulting type after applying the + operator.

impl Add<u64> for LBNum[src]

type Output = Self

The resulting type after applying the + operator.

impl Add<u8> for LBNum[src]

type Output = Self

The resulting type after applying the + operator.

impl Add<usize> for LBNum[src]

type Output = Self

The resulting type after applying the + operator.

impl<'_> AddAssign<&'_ LBNum> for LBNum[src]

impl AddAssign<LBNum> for LBNum[src]

impl AddAssign<LBNum> for u8[src]

impl AddAssign<LBNum> for u16[src]

impl AddAssign<LBNum> for u32[src]

impl AddAssign<LBNum> for u64[src]

impl AddAssign<LBNum> for u128[src]

impl AddAssign<LBNum> for usize[src]

impl<'_> AddAssign<LBNumRef<'_>> for LBNum[src]

impl AddAssign<u128> for LBNum[src]

impl AddAssign<u16> for LBNum[src]

impl AddAssign<u32> for LBNum[src]

impl AddAssign<u64> for LBNum[src]

impl AddAssign<u8> for LBNum[src]

impl AddAssign<usize> for LBNum[src]

impl AsRef<[LinkedByte]> for LBNum[src]

impl Binary for LBNum[src]

impl Borrow<[LinkedByte]> for LBNum[src]

impl Clone for LBNum[src]

impl Debug for LBNum[src]

impl Display for LBNum[src]

impl<'_> Div<&'_ LBNum> for LBNum[src]

type Output = Self

The resulting type after applying the / operator.

fn div(self, rhs: &Self) -> Self[src]

Performs integer division.

Panics

Dividing by 0 triggers an immediate panic.

impl Div<LBNum> for LBNum[src]

type Output = Self

The resulting type after applying the / operator.

fn div(self, rhs: Self) -> Self[src]

Performs integer division.

Panics

Dividing by 0 triggers an immediate panic.

impl Div<u128> for LBNum[src]

type Output = Self

The resulting type after applying the / operator.

impl Div<u16> for LBNum[src]

type Output = Self

The resulting type after applying the / operator.

impl Div<u32> for LBNum[src]

type Output = Self

The resulting type after applying the / operator.

impl Div<u64> for LBNum[src]

type Output = Self

The resulting type after applying the / operator.

impl Div<u8> for LBNum[src]

type Output = Self

The resulting type after applying the / operator.

impl Div<usize> for LBNum[src]

type Output = Self

The resulting type after applying the / operator.

impl<'_> DivAssign<&'_ LBNum> for LBNum[src]

fn div_assign(&mut self, rhs: &Self)[src]

Performs integer division in place.

Panics

Dividing by 0 triggers an immediate panic.

impl DivAssign<LBNum> for LBNum[src]

fn div_assign(&mut self, rhs: Self)[src]

Performs integer division in place.

Panics

Dividing by 0 triggers an immediate panic.

impl DivAssign<u128> for LBNum[src]

impl DivAssign<u16> for LBNum[src]

impl DivAssign<u32> for LBNum[src]

impl DivAssign<u64> for LBNum[src]

impl DivAssign<u8> for LBNum[src]

impl DivAssign<usize> for LBNum[src]

impl<'_> DivRem<&'_ LBNum> for LBNum[src]

type Quotient = Self

The type for the quotient.

type Remainder = Self

The type for the remainder.

fn div_rem(self, rhs: &Self) -> (Self, Self)[src]

Performs combined integer division and remainder calculation.

Panics

Dividing by 0 triggers an immediate panic.

impl DivRem<LBNum> for LBNum[src]

type Quotient = Self

The type for the quotient.

type Remainder = Self

The type for the remainder.

fn div_rem(self, rhs: Self) -> (Self, Self)[src]

Performs combined integer division and remainder calculation.

Panics

Dividing by 0 triggers an immediate panic.

impl DivRem<u128> for LBNum[src]

type Quotient = Self

The type for the quotient.

type Remainder = Self

The remainder type.

The reason why this is Self instead of the type of the divisor is that the remainder as available when the division is finished is still of type LBNum: it's never converted to the divisor type. As a result, the remainder is returned as-is to avoid situations when the remainder is required to be an LBNum yet has been converted to the divisor type, which would require converting it back into LBNum, which would require another allocation and performing the conversion process itself and would also waste the previous buffer.

impl DivRem<u16> for LBNum[src]

type Quotient = Self

The type for the quotient.

type Remainder = Self

The remainder type.

The reason why this is Self instead of the type of the divisor is that the remainder as available when the division is finished is still of type LBNum: it's never converted to the divisor type. As a result, the remainder is returned as-is to avoid situations when the remainder is required to be an LBNum yet has been converted to the divisor type, which would require converting it back into LBNum, which would require another allocation and performing the conversion process itself and would also waste the previous buffer.

impl DivRem<u32> for LBNum[src]

type Quotient = Self

The type for the quotient.

type Remainder = Self

The remainder type.

The reason why this is Self instead of the type of the divisor is that the remainder as available when the division is finished is still of type LBNum: it's never converted to the divisor type. As a result, the remainder is returned as-is to avoid situations when the remainder is required to be an LBNum yet has been converted to the divisor type, which would require converting it back into LBNum, which would require another allocation and performing the conversion process itself and would also waste the previous buffer.

impl DivRem<u64> for LBNum[src]

type Quotient = Self

The type for the quotient.

type Remainder = Self

The remainder type.

The reason why this is Self instead of the type of the divisor is that the remainder as available when the division is finished is still of type LBNum: it's never converted to the divisor type. As a result, the remainder is returned as-is to avoid situations when the remainder is required to be an LBNum yet has been converted to the divisor type, which would require converting it back into LBNum, which would require another allocation and performing the conversion process itself and would also waste the previous buffer.

impl DivRem<u8> for LBNum[src]

type Quotient = Self

The type for the quotient.

type Remainder = Self

The remainder type.

The reason why this is Self instead of the type of the divisor is that the remainder as available when the division is finished is still of type LBNum: it's never converted to the divisor type. As a result, the remainder is returned as-is to avoid situations when the remainder is required to be an LBNum yet has been converted to the divisor type, which would require converting it back into LBNum, which would require another allocation and performing the conversion process itself and would also waste the previous buffer.

impl DivRem<usize> for LBNum[src]

type Quotient = Self

The type for the quotient.

type Remainder = Self

The remainder type.

The reason why this is Self instead of the type of the divisor is that the remainder as available when the division is finished is still of type LBNum: it's never converted to the divisor type. As a result, the remainder is returned as-is to avoid situations when the remainder is required to be an LBNum yet has been converted to the divisor type, which would require converting it back into LBNum, which would require another allocation and performing the conversion process itself and would also waste the previous buffer.

impl<'_> DivRemAssign<&'_ LBNum> for LBNum[src]

type Remainder = Self

The type for the remainder.

fn div_rem_assign(&mut self, rhs: &Self) -> Self[src]

Performs in-place integer division combined with returning the remainder.

Panics

Dividing by 0 triggers an immediate panic.

impl DivRemAssign<LBNum> for LBNum[src]

type Remainder = Self

The type for the remainder.

fn div_rem_assign(&mut self, rhs: Self) -> Self[src]

Performs in-place integer division combined with returning the remainder.

Panics

Dividing by 0 triggers an immediate panic.

impl DivRemAssign<u128> for LBNum[src]

type Remainder = Self

The remainder type.

The reason why this is Self instead of the type of the divisor is that the remainder as available when the division is finished is still of type LBNum: it's never converted to the divisor type. As a result, the remainder is returned as-is to avoid situations when the remainder is required to be an LBNum yet has been converted to the divisor type, which would require converting it back into LBNum, which would require another allocation and performing the conversion process itself and would also waste the previous buffer.

impl DivRemAssign<u16> for LBNum[src]

type Remainder = Self

The remainder type.

The reason why this is Self instead of the type of the divisor is that the remainder as available when the division is finished is still of type LBNum: it's never converted to the divisor type. As a result, the remainder is returned as-is to avoid situations when the remainder is required to be an LBNum yet has been converted to the divisor type, which would require converting it back into LBNum, which would require another allocation and performing the conversion process itself and would also waste the previous buffer.

impl DivRemAssign<u32> for LBNum[src]

type Remainder = Self

The remainder type.

The reason why this is Self instead of the type of the divisor is that the remainder as available when the division is finished is still of type LBNum: it's never converted to the divisor type. As a result, the remainder is returned as-is to avoid situations when the remainder is required to be an LBNum yet has been converted to the divisor type, which would require converting it back into LBNum, which would require another allocation and performing the conversion process itself and would also waste the previous buffer.

impl DivRemAssign<u64> for LBNum[src]

type Remainder = Self

The remainder type.

The reason why this is Self instead of the type of the divisor is that the remainder as available when the division is finished is still of type LBNum: it's never converted to the divisor type. As a result, the remainder is returned as-is to avoid situations when the remainder is required to be an LBNum yet has been converted to the divisor type, which would require converting it back into LBNum, which would require another allocation and performing the conversion process itself and would also waste the previous buffer.

impl DivRemAssign<u8> for LBNum[src]

type Remainder = Self

The remainder type.

The reason why this is Self instead of the type of the divisor is that the remainder as available when the division is finished is still of type LBNum: it's never converted to the divisor type. As a result, the remainder is returned as-is to avoid situations when the remainder is required to be an LBNum yet has been converted to the divisor type, which would require converting it back into LBNum, which would require another allocation and performing the conversion process itself and would also waste the previous buffer.

impl DivRemAssign<usize> for LBNum[src]

type Remainder = Self

The remainder type.

The reason why this is Self instead of the type of the divisor is that the remainder as available when the division is finished is still of type LBNum: it's never converted to the divisor type. As a result, the remainder is returned as-is to avoid situations when the remainder is required to be an LBNum yet has been converted to the divisor type, which would require converting it back into LBNum, which would require another allocation and performing the conversion process itself and would also waste the previous buffer.

impl Eq for LBNum[src]

impl<'a> From<&'a LBNum> for LBNumRef<'a>[src]

impl From<u128> for LBNum[src]

impl From<u16> for LBNum[src]

impl From<u32> for LBNum[src]

impl From<u64> for LBNum[src]

impl From<u8> for LBNum[src]

impl From<usize> for LBNum[src]

impl FromIterator<LinkedByte> for LBNum[src]

fn from_iter<T: IntoIterator<Item = LinkedByte>>(op: T) -> Self[src]

Converts an iterator over linked bytes into an LBNum. Little-endian byte order is assumed, regardless of platform.

If any of the bytes except for the last one are endpoints (most significant bit cleared), they are converted into linked (most significant bit set), and if the last byte is linked, it's converted into and endpoint.

If possible, use TryFrom or from_sequence instead.

impl LowerHex for LBNum[src]

impl Mul<LBNum> for LBNum[src]

type Output = Self

The resulting type after applying the * operator.

fn mul(self, rhs: Self) -> Self[src]

Multiplies self by another LBNum. This will consume rhs.

impl Mul<u128> for LBNum[src]

type Output = Self

The resulting type after applying the * operator.

impl Mul<u16> for LBNum[src]

type Output = Self

The resulting type after applying the * operator.

impl Mul<u32> for LBNum[src]

type Output = Self

The resulting type after applying the * operator.

impl Mul<u64> for LBNum[src]

type Output = Self

The resulting type after applying the * operator.

impl Mul<u8> for LBNum[src]

type Output = Self

The resulting type after applying the * operator.

impl Mul<usize> for LBNum[src]

type Output = Self

The resulting type after applying the * operator.

impl MulAssign<LBNum> for LBNum[src]

fn mul_assign(&mut self, rhs: Self)[src]

Multiplies self by another LBNum in place. This will consume rhs.

impl MulAssign<u128> for LBNum[src]

impl MulAssign<u16> for LBNum[src]

impl MulAssign<u32> for LBNum[src]

impl MulAssign<u64> for LBNum[src]

impl MulAssign<u8> for LBNum[src]

impl MulAssign<usize> for LBNum[src]

impl Octal for LBNum[src]

impl Ord for LBNum[src]

impl PartialEq<LBNum> for LBNum[src]

impl PartialEq<LBNum> for u8[src]

impl PartialEq<LBNum> for u16[src]

impl PartialEq<LBNum> for u32[src]

impl PartialEq<LBNum> for u64[src]

impl PartialEq<LBNum> for u128[src]

impl PartialEq<LBNum> for usize[src]

impl PartialEq<u128> for LBNum[src]

impl PartialEq<u16> for LBNum[src]

impl PartialEq<u32> for LBNum[src]

impl PartialEq<u64> for LBNum[src]

impl PartialEq<u8> for LBNum[src]

impl PartialEq<usize> for LBNum[src]

impl PartialOrd<LBNum> for LBNum[src]

impl PartialOrd<LBNum> for u8[src]

fn partial_cmp(&self, rhs: &LBNum) -> Option<Ordering>[src]

Compares self and rhs.

Never fails, a return value of Some can be relied upon.

impl PartialOrd<LBNum> for u16[src]

fn partial_cmp(&self, rhs: &LBNum) -> Option<Ordering>[src]

Compares self and rhs.

Never fails, a return value of Some can be relied upon.

impl PartialOrd<LBNum> for u32[src]

fn partial_cmp(&self, rhs: &LBNum) -> Option<Ordering>[src]

Compares self and rhs.

Never fails, a return value of Some can be relied upon.

impl PartialOrd<LBNum> for u64[src]

fn partial_cmp(&self, rhs: &LBNum) -> Option<Ordering>[src]

Compares self and rhs.

Never fails, a return value of Some can be relied upon.

impl PartialOrd<LBNum> for u128[src]

fn partial_cmp(&self, rhs: &LBNum) -> Option<Ordering>[src]

Compares self and rhs.

Never fails, a return value of Some can be relied upon.

impl PartialOrd<LBNum> for usize[src]

fn partial_cmp(&self, rhs: &LBNum) -> Option<Ordering>[src]

Compares self and rhs.

Never fails, a return value of Some can be relied upon.

impl PartialOrd<u128> for LBNum[src]

fn partial_cmp(&self, rhs: &u128) -> Option<Ordering>[src]

Compares self and rhs.

Never fails, a return value of Some can be relied upon.

impl PartialOrd<u16> for LBNum[src]

fn partial_cmp(&self, rhs: &u16) -> Option<Ordering>[src]

Compares self and rhs.

Never fails, a return value of Some can be relied upon.

impl PartialOrd<u32> for LBNum[src]

fn partial_cmp(&self, rhs: &u32) -> Option<Ordering>[src]

Compares self and rhs.

Never fails, a return value of Some can be relied upon.

impl PartialOrd<u64> for LBNum[src]

fn partial_cmp(&self, rhs: &u64) -> Option<Ordering>[src]

Compares self and rhs.

Never fails, a return value of Some can be relied upon.

impl PartialOrd<u8> for LBNum[src]

fn partial_cmp(&self, rhs: &u8) -> Option<Ordering>[src]

Compares self and rhs.

Never fails, a return value of Some can be relied upon.

impl PartialOrd<usize> for LBNum[src]

fn partial_cmp(&self, rhs: &usize) -> Option<Ordering>[src]

Compares self and rhs.

Never fails, a return value of Some can be relied upon.

impl<'_> Rem<&'_ LBNum> for LBNum[src]

type Output = Self

The resulting type after applying the % operator.

fn rem(self, rhs: &Self) -> Self[src]

Performs integer modulo.

Panics

Dividing by 0 triggers an immediate panic.

impl Rem<LBNum> for LBNum[src]

type Output = Self

The resulting type after applying the % operator.

fn rem(self, rhs: Self) -> Self[src]

Performs integer modulo.

Panics

Dividing by 0 triggers an immediate panic.

impl Rem<u128> for LBNum[src]

type Output = Self

The remainder type.

The reason why this is Self instead of the type of the divisor is that the remainder as available when the division is finished is still of type LBNum: it's never converted to the divisor type. As a result, the remainder is returned as-is to avoid situations when the remainder is required to be an LBNum yet has been converted to the divisor type, which would require converting it back into LBNum, which would require another allocation and performing the conversion process itself and would also waste the previous buffer.

impl Rem<u16> for LBNum[src]

type Output = Self

The remainder type.

The reason why this is Self instead of the type of the divisor is that the remainder as available when the division is finished is still of type LBNum: it's never converted to the divisor type. As a result, the remainder is returned as-is to avoid situations when the remainder is required to be an LBNum yet has been converted to the divisor type, which would require converting it back into LBNum, which would require another allocation and performing the conversion process itself and would also waste the previous buffer.

impl Rem<u32> for LBNum[src]

type Output = Self

The remainder type.

The reason why this is Self instead of the type of the divisor is that the remainder as available when the division is finished is still of type LBNum: it's never converted to the divisor type. As a result, the remainder is returned as-is to avoid situations when the remainder is required to be an LBNum yet has been converted to the divisor type, which would require converting it back into LBNum, which would require another allocation and performing the conversion process itself and would also waste the previous buffer.

impl Rem<u64> for LBNum[src]

type Output = Self

The remainder type.

The reason why this is Self instead of the type of the divisor is that the remainder as available when the division is finished is still of type LBNum: it's never converted to the divisor type. As a result, the remainder is returned as-is to avoid situations when the remainder is required to be an LBNum yet has been converted to the divisor type, which would require converting it back into LBNum, which would require another allocation and performing the conversion process itself and would also waste the previous buffer.

impl Rem<u8> for LBNum[src]

type Output = Self

The remainder type.

The reason why this is Self instead of the type of the divisor is that the remainder as available when the division is finished is still of type LBNum: it's never converted to the divisor type. As a result, the remainder is returned as-is to avoid situations when the remainder is required to be an LBNum yet has been converted to the divisor type, which would require converting it back into LBNum, which would require another allocation and performing the conversion process itself and would also waste the previous buffer.

impl Rem<usize> for LBNum[src]

type Output = Self

The remainder type.

The reason why this is Self instead of the type of the divisor is that the remainder as available when the division is finished is still of type LBNum: it's never converted to the divisor type. As a result, the remainder is returned as-is to avoid situations when the remainder is required to be an LBNum yet has been converted to the divisor type, which would require converting it back into LBNum, which would require another allocation and performing the conversion process itself and would also waste the previous buffer.

impl<'_> RemAssign<&'_ LBNum> for LBNum[src]

fn rem_assign(&mut self, rhs: &Self)[src]

Performs integer modulo in place.

Panics

Dividing by 0 triggers an immediate panic.

impl RemAssign<LBNum> for LBNum[src]

fn rem_assign(&mut self, rhs: Self)[src]

Performs integer modulo in place.

Panics

Dividing by 0 triggers an immediate panic.

impl RemAssign<u128> for LBNum[src]

impl RemAssign<u16> for LBNum[src]

impl RemAssign<u32> for LBNum[src]

impl RemAssign<u64> for LBNum[src]

impl RemAssign<u8> for LBNum[src]

impl RemAssign<usize> for LBNum[src]

impl<'_> Sub<&'_ LBNum> for LBNum[src]

type Output = Self

The resulting type after applying the - operator.

fn sub(self, rhs: &Self) -> Self[src]

Subtracts an LBNum from self.

Panics

Subtraction underflow is undefined for the Linked Bytes format, since it only specifies unsigned integers.

impl Sub<LBNum> for LBNum[src]

type Output = Self

The resulting type after applying the - operator.

fn sub(self, rhs: Self) -> Self[src]

Subtracts an LBNum from self.

Panics

Subtraction underflow is undefined for the Linked Bytes format, since it only specifies unsigned integers.

impl Sub<u128> for LBNum[src]

type Output = Self

The resulting type after applying the - operator.

fn sub(self, rhs: u128) -> Self[src]

Subtracts rhs from self.

Panics

Subtraction underflow is undefined for the Linked Bytes format, since it only specifies unsigned integers.

impl Sub<u16> for LBNum[src]

type Output = Self

The resulting type after applying the - operator.

fn sub(self, rhs: u16) -> Self[src]

Subtracts rhs from self.

Panics

Subtraction underflow is undefined for the Linked Bytes format, since it only specifies unsigned integers.

impl Sub<u32> for LBNum[src]

type Output = Self

The resulting type after applying the - operator.

fn sub(self, rhs: u32) -> Self[src]

Subtracts rhs from self.

Panics

Subtraction underflow is undefined for the Linked Bytes format, since it only specifies unsigned integers.

impl Sub<u64> for LBNum[src]

type Output = Self

The resulting type after applying the - operator.

fn sub(self, rhs: u64) -> Self[src]

Subtracts rhs from self.

Panics

Subtraction underflow is undefined for the Linked Bytes format, since it only specifies unsigned integers.

impl Sub<u8> for LBNum[src]

type Output = Self

The resulting type after applying the - operator.

fn sub(self, rhs: u8) -> Self[src]

Subtracts rhs from self.

Panics

Subtraction underflow is undefined for the Linked Bytes format, since it only specifies unsigned integers.

impl Sub<usize> for LBNum[src]

type Output = Self

The resulting type after applying the - operator.

fn sub(self, rhs: usize) -> Self[src]

Subtracts rhs from self.

Panics

Subtraction underflow is undefined for the Linked Bytes format, since it only specifies unsigned integers.

impl<'_> SubAssign<&'_ LBNum> for LBNum[src]

fn sub_assign(&mut self, rhs: &Self)[src]

Subtracts an LBNum from self in place.

Panics

Subtraction underflow is undefined for the Linked Bytes format, since it only specifies unsigned integers.

impl SubAssign<LBNum> for LBNum[src]

fn sub_assign(&mut self, rhs: Self)[src]

Subtracts an LBNum from self in place.

Panics

Subtraction underflow is undefined for the Linked Bytes format, since it only specifies unsigned integers.

impl SubAssign<u128> for LBNum[src]

Subtracts rhs from self in place.

Panics

Subtraction underflow is undefined for the Linked Bytes format, since it only specifies unsigned integers.

impl SubAssign<u16> for LBNum[src]

Subtracts rhs from self in place.

Panics

Subtraction underflow is undefined for the Linked Bytes format, since it only specifies unsigned integers.

impl SubAssign<u32> for LBNum[src]

Subtracts rhs from self in place.

Panics

Subtraction underflow is undefined for the Linked Bytes format, since it only specifies unsigned integers.

impl SubAssign<u64> for LBNum[src]

Subtracts rhs from self in place.

Panics

Subtraction underflow is undefined for the Linked Bytes format, since it only specifies unsigned integers.

impl SubAssign<u8> for LBNum[src]

Subtracts rhs from self in place.

Panics

Subtraction underflow is undefined for the Linked Bytes format, since it only specifies unsigned integers.

impl SubAssign<usize> for LBNum[src]

Subtracts rhs from self in place.

Panics

Subtraction underflow is undefined for the Linked Bytes format, since it only specifies unsigned integers.

impl<'a> TryFrom<&'a LBNum> for u8[src]

type Error = TryFromIntError

The type returned in the event of a conversion error.

impl<'a> TryFrom<&'a LBNum> for u16[src]

type Error = TryFromIntError

The type returned in the event of a conversion error.

impl<'a> TryFrom<&'a LBNum> for isize[src]

type Error = TryFromIntError

The type returned in the event of a conversion error.

impl<'a> TryFrom<&'a LBNum> for i16[src]

type Error = TryFromIntError

The type returned in the event of a conversion error.

impl<'a> TryFrom<&'a LBNum> for u32[src]

type Error = TryFromIntError

The type returned in the event of a conversion error.

impl<'a> TryFrom<&'a LBNum> for i32[src]

type Error = TryFromIntError

The type returned in the event of a conversion error.

impl<'a> TryFrom<&'a LBNum> for u64[src]

type Error = TryFromIntError

The type returned in the event of a conversion error.

impl<'a> TryFrom<&'a LBNum> for i64[src]

type Error = TryFromIntError

The type returned in the event of a conversion error.

impl<'a> TryFrom<&'a LBNum> for u128[src]

type Error = TryFromIntError

The type returned in the event of a conversion error.

impl<'a> TryFrom<&'a LBNum> for i128[src]

type Error = TryFromIntError

The type returned in the event of a conversion error.

impl<'a> TryFrom<&'a LBNum> for usize[src]

type Error = TryFromIntError

The type returned in the event of a conversion error.

impl TryFrom<LBNum> for u8[src]

type Error = TryFromIntError

The type returned in the event of a conversion error.

impl TryFrom<LBNum> for u16[src]

type Error = TryFromIntError

The type returned in the event of a conversion error.

impl TryFrom<LBNum> for isize[src]

type Error = TryFromIntError

The type returned in the event of a conversion error.

impl TryFrom<LBNum> for i16[src]

type Error = TryFromIntError

The type returned in the event of a conversion error.

impl TryFrom<LBNum> for u32[src]

type Error = TryFromIntError

The type returned in the event of a conversion error.

impl TryFrom<LBNum> for i32[src]

type Error = TryFromIntError

The type returned in the event of a conversion error.

impl TryFrom<LBNum> for u64[src]

type Error = TryFromIntError

The type returned in the event of a conversion error.

impl TryFrom<LBNum> for i64[src]

type Error = TryFromIntError

The type returned in the event of a conversion error.

impl TryFrom<LBNum> for u128[src]

type Error = TryFromIntError

The type returned in the event of a conversion error.

impl TryFrom<LBNum> for i128[src]

type Error = TryFromIntError

The type returned in the event of a conversion error.

impl TryFrom<LBNum> for usize[src]

type Error = TryFromIntError

The type returned in the event of a conversion error.

impl TryFrom<LBSequence> for LBNum[src]

type Error = InvalidLBSequence

The type returned in the event of a conversion error.

fn try_from(op: LBSequence) -> DecodeResult[src]

Converts an LBSequence into an LBNum. Little-endian byte order is assumed, regardless of platform.

Errors

See InvalidLBSequence.

impl TryFrom<Vec<LinkedByte>> for LBNum[src]

type Error = InvalidLBSequence

The type returned in the event of a conversion error.

fn try_from(op: Vec<LinkedByte>) -> DecodeResult[src]

Converts a Vec<LinkedByte> into an LBNum. Little-endian byte order is assumed, regardless of platform.

Errors

See InvalidLBSequence.

impl UpperHex for LBNum[src]

Auto Trait Implementations

impl Send for LBNum

impl Sync for LBNum

impl Unpin for LBNum

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.