[−][src]Struct bigbit::linkedbytes::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]
&self
) -> impl Iterator<Item = LinkedByte> + DoubleEndedIterator + '_
Returns an iterator over the linked bytes, in little-endian byte order.
pub fn iter_be(
&self
) -> impl Iterator<Item = LinkedByte> + DoubleEndedIterator + '_
[src]
&self
) -> impl Iterator<Item = LinkedByte> + DoubleEndedIterator + '_
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 LinkedByte
s 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.
fn add(self, rhs: &Self) -> Self
[src]
impl Add<LBNum> for LBNum
[src]
type Output = Self
The resulting type after applying the +
operator.
fn add(self, rhs: Self) -> Self
[src]
impl Add<LBNum> for u8
[src]
type Output = LBNum
The resulting type after applying the +
operator.
fn add(self, rhs: LBNum) -> LBNum
[src]
impl Add<LBNum> for u16
[src]
type Output = LBNum
The resulting type after applying the +
operator.
fn add(self, rhs: LBNum) -> LBNum
[src]
impl Add<LBNum> for u32
[src]
type Output = LBNum
The resulting type after applying the +
operator.
fn add(self, rhs: LBNum) -> LBNum
[src]
impl Add<LBNum> for u64
[src]
type Output = LBNum
The resulting type after applying the +
operator.
fn add(self, rhs: LBNum) -> LBNum
[src]
impl Add<LBNum> for u128
[src]
type Output = LBNum
The resulting type after applying the +
operator.
fn add(self, rhs: LBNum) -> LBNum
[src]
impl Add<LBNum> for usize
[src]
type Output = LBNum
The resulting type after applying the +
operator.
fn add(self, rhs: LBNum) -> LBNum
[src]
impl<'_> Add<LBNumRef<'_>> for LBNum
[src]
type Output = Self
The resulting type after applying the +
operator.
fn add(self, rhs: LBNumRef) -> Self
[src]
impl Add<u128> for LBNum
[src]
type Output = Self
The resulting type after applying the +
operator.
fn add(self, rhs: u128) -> Self
[src]
impl Add<u16> for LBNum
[src]
type Output = Self
The resulting type after applying the +
operator.
fn add(self, rhs: u16) -> Self
[src]
impl Add<u32> for LBNum
[src]
type Output = Self
The resulting type after applying the +
operator.
fn add(self, rhs: u32) -> Self
[src]
impl Add<u64> for LBNum
[src]
type Output = Self
The resulting type after applying the +
operator.
fn add(self, rhs: u64) -> Self
[src]
impl Add<u8> for LBNum
[src]
type Output = Self
The resulting type after applying the +
operator.
fn add(self, rhs: u8) -> Self
[src]
impl Add<usize> for LBNum
[src]
type Output = Self
The resulting type after applying the +
operator.
fn add(self, rhs: usize) -> Self
[src]
impl<'_> AddAssign<&'_ LBNum> for LBNum
[src]
fn add_assign(&mut self, rhs: &Self)
[src]
impl AddAssign<LBNum> for LBNum
[src]
fn add_assign(&mut self, rhs: Self)
[src]
impl AddAssign<LBNum> for u8
[src]
fn add_assign(&mut self, rhs: LBNum)
[src]
impl AddAssign<LBNum> for u16
[src]
fn add_assign(&mut self, rhs: LBNum)
[src]
impl AddAssign<LBNum> for u32
[src]
fn add_assign(&mut self, rhs: LBNum)
[src]
impl AddAssign<LBNum> for u64
[src]
fn add_assign(&mut self, rhs: LBNum)
[src]
impl AddAssign<LBNum> for u128
[src]
fn add_assign(&mut self, rhs: LBNum)
[src]
impl AddAssign<LBNum> for usize
[src]
fn add_assign(&mut self, rhs: LBNum)
[src]
impl<'_> AddAssign<LBNumRef<'_>> for LBNum
[src]
fn add_assign(&mut self, rhs: LBNumRef)
[src]
impl AddAssign<u128> for LBNum
[src]
fn add_assign(&mut self, rhs: u128)
[src]
impl AddAssign<u16> for LBNum
[src]
fn add_assign(&mut self, rhs: u16)
[src]
impl AddAssign<u32> for LBNum
[src]
fn add_assign(&mut self, rhs: u32)
[src]
impl AddAssign<u64> for LBNum
[src]
fn add_assign(&mut self, rhs: u64)
[src]
impl AddAssign<u8> for LBNum
[src]
fn add_assign(&mut self, rhs: u8)
[src]
impl AddAssign<usize> for LBNum
[src]
fn add_assign(&mut self, rhs: usize)
[src]
impl AsRef<[LinkedByte]> for LBNum
[src]
fn as_ref(&self) -> &[LinkedByte]
[src]
impl Binary for LBNum
[src]
impl Borrow<[LinkedByte]> for LBNum
[src]
fn borrow(&self) -> &[LinkedByte]
[src]
impl Clone for LBNum
[src]
fn clone(&self) -> LBNum
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[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]
impl Div<LBNum> for LBNum
[src]
type Output = Self
The resulting type after applying the /
operator.
fn div(self, rhs: Self) -> Self
[src]
impl Div<u128> for LBNum
[src]
type Output = Self
The resulting type after applying the /
operator.
fn div(self, rhs: u128) -> Self
[src]
impl Div<u16> for LBNum
[src]
type Output = Self
The resulting type after applying the /
operator.
fn div(self, rhs: u16) -> Self
[src]
impl Div<u32> for LBNum
[src]
type Output = Self
The resulting type after applying the /
operator.
fn div(self, rhs: u32) -> Self
[src]
impl Div<u64> for LBNum
[src]
type Output = Self
The resulting type after applying the /
operator.
fn div(self, rhs: u64) -> Self
[src]
impl Div<u8> for LBNum
[src]
type Output = Self
The resulting type after applying the /
operator.
fn div(self, rhs: u8) -> Self
[src]
impl Div<usize> for LBNum
[src]
type Output = Self
The resulting type after applying the /
operator.
fn div(self, rhs: usize) -> Self
[src]
impl<'_> DivAssign<&'_ LBNum> for LBNum
[src]
fn div_assign(&mut self, rhs: &Self)
[src]
impl DivAssign<LBNum> for LBNum
[src]
fn div_assign(&mut self, rhs: Self)
[src]
impl DivAssign<u128> for LBNum
[src]
fn div_assign(&mut self, rhs: u128)
[src]
impl DivAssign<u16> for LBNum
[src]
fn div_assign(&mut self, rhs: u16)
[src]
impl DivAssign<u32> for LBNum
[src]
fn div_assign(&mut self, rhs: u32)
[src]
impl DivAssign<u64> for LBNum
[src]
fn div_assign(&mut self, rhs: u64)
[src]
impl DivAssign<u8> for LBNum
[src]
fn div_assign(&mut self, rhs: u8)
[src]
impl DivAssign<usize> for LBNum
[src]
fn div_assign(&mut self, rhs: usize)
[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.
fn div_rem(self, rhs: u128) -> (Self, Self)
[src]
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.
fn div_rem(self, rhs: u16) -> (Self, Self)
[src]
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.
fn div_rem(self, rhs: u32) -> (Self, Self)
[src]
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.
fn div_rem(self, rhs: u64) -> (Self, Self)
[src]
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.
fn div_rem(self, rhs: u8) -> (Self, Self)
[src]
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.
fn div_rem(self, rhs: usize) -> (Self, Self)
[src]
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.
fn div_rem_assign(&mut self, rhs: u128) -> Self
[src]
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.
fn div_rem_assign(&mut self, rhs: u16) -> Self
[src]
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.
fn div_rem_assign(&mut self, rhs: u32) -> Self
[src]
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.
fn div_rem_assign(&mut self, rhs: u64) -> Self
[src]
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.
fn div_rem_assign(&mut self, rhs: u8) -> Self
[src]
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.
fn div_rem_assign(&mut self, rhs: usize) -> Self
[src]
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.
fn mul(self, rhs: u128) -> Self
[src]
impl Mul<u16> for LBNum
[src]
type Output = Self
The resulting type after applying the *
operator.
fn mul(self, rhs: u16) -> Self
[src]
impl Mul<u32> for LBNum
[src]
type Output = Self
The resulting type after applying the *
operator.
fn mul(self, rhs: u32) -> Self
[src]
impl Mul<u64> for LBNum
[src]
type Output = Self
The resulting type after applying the *
operator.
fn mul(self, rhs: u64) -> Self
[src]
impl Mul<u8> for LBNum
[src]
type Output = Self
The resulting type after applying the *
operator.
fn mul(self, rhs: u8) -> Self
[src]
impl Mul<usize> for LBNum
[src]
type Output = Self
The resulting type after applying the *
operator.
fn mul(self, rhs: usize) -> Self
[src]
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]
fn mul_assign(&mut self, rhs: u128)
[src]
impl MulAssign<u16> for LBNum
[src]
fn mul_assign(&mut self, rhs: u16)
[src]
impl MulAssign<u32> for LBNum
[src]
fn mul_assign(&mut self, rhs: u32)
[src]
impl MulAssign<u64> for LBNum
[src]
fn mul_assign(&mut self, rhs: u64)
[src]
impl MulAssign<u8> for LBNum
[src]
fn mul_assign(&mut self, rhs: u8)
[src]
impl MulAssign<usize> for LBNum
[src]
fn mul_assign(&mut self, rhs: usize)
[src]
impl Octal for LBNum
[src]
impl Ord for LBNum
[src]
fn cmp(&self, rhs: &Self) -> Ordering
[src]
#[must_use]fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn clamp(self, min: Self, max: Self) -> Self
[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]
fn partial_cmp(&self, rhs: &Self) -> Option<Ordering>
[src]
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn ge(&self, other: &Rhs) -> bool
1.0.0[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.
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
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.
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
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.
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
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.
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
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.
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
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.
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
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.
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
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.
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
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.
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
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.
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
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.
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
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.
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
impl<'_> Rem<&'_ LBNum> for LBNum
[src]
type Output = Self
The resulting type after applying the %
operator.
fn rem(self, rhs: &Self) -> Self
[src]
impl Rem<LBNum> for LBNum
[src]
type Output = Self
The resulting type after applying the %
operator.
fn rem(self, rhs: Self) -> Self
[src]
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.
fn rem(self, rhs: u128) -> Self
[src]
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.
fn rem(self, rhs: u16) -> Self
[src]
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.
fn rem(self, rhs: u32) -> Self
[src]
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.
fn rem(self, rhs: u64) -> Self
[src]
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.
fn rem(self, rhs: u8) -> Self
[src]
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.
fn rem(self, rhs: usize) -> Self
[src]
impl<'_> RemAssign<&'_ LBNum> for LBNum
[src]
fn rem_assign(&mut self, rhs: &Self)
[src]
impl RemAssign<LBNum> for LBNum
[src]
fn rem_assign(&mut self, rhs: Self)
[src]
impl RemAssign<u128> for LBNum
[src]
fn rem_assign(&mut self, rhs: u128)
[src]
impl RemAssign<u16> for LBNum
[src]
fn rem_assign(&mut self, rhs: u16)
[src]
impl RemAssign<u32> for LBNum
[src]
fn rem_assign(&mut self, rhs: u32)
[src]
impl RemAssign<u64> for LBNum
[src]
fn rem_assign(&mut self, rhs: u64)
[src]
impl RemAssign<u8> for LBNum
[src]
fn rem_assign(&mut self, rhs: u8)
[src]
impl RemAssign<usize> for LBNum
[src]
fn rem_assign(&mut self, rhs: usize)
[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.
fn sub_assign(&mut self, rhs: u128)
[src]
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.
fn sub_assign(&mut self, rhs: u16)
[src]
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.
fn sub_assign(&mut self, rhs: u32)
[src]
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.
fn sub_assign(&mut self, rhs: u64)
[src]
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.
fn sub_assign(&mut self, rhs: u8)
[src]
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.
fn sub_assign(&mut self, rhs: usize)
[src]
impl<'a> TryFrom<&'a LBNum> for u8
[src]
type Error = TryFromIntError
The type returned in the event of a conversion error.
fn try_from(op: &'a LBNum) -> Result<u8, TryFromIntError>
[src]
impl<'a> TryFrom<&'a LBNum> for u16
[src]
type Error = TryFromIntError
The type returned in the event of a conversion error.
fn try_from(op: &'a LBNum) -> Result<u16, TryFromIntError>
[src]
impl<'a> TryFrom<&'a LBNum> for isize
[src]
type Error = TryFromIntError
The type returned in the event of a conversion error.
fn try_from(op: &'a LBNum) -> Result<isize, TryFromIntError>
[src]
impl<'a> TryFrom<&'a LBNum> for i16
[src]
type Error = TryFromIntError
The type returned in the event of a conversion error.
fn try_from(op: &'a LBNum) -> Result<i16, TryFromIntError>
[src]
impl<'a> TryFrom<&'a LBNum> for u32
[src]
type Error = TryFromIntError
The type returned in the event of a conversion error.
fn try_from(op: &'a LBNum) -> Result<u32, TryFromIntError>
[src]
impl<'a> TryFrom<&'a LBNum> for i32
[src]
type Error = TryFromIntError
The type returned in the event of a conversion error.
fn try_from(op: &'a LBNum) -> Result<i32, TryFromIntError>
[src]
impl<'a> TryFrom<&'a LBNum> for u64
[src]
type Error = TryFromIntError
The type returned in the event of a conversion error.
fn try_from(op: &'a LBNum) -> Result<u64, TryFromIntError>
[src]
impl<'a> TryFrom<&'a LBNum> for i64
[src]
type Error = TryFromIntError
The type returned in the event of a conversion error.
fn try_from(op: &'a LBNum) -> Result<i64, TryFromIntError>
[src]
impl<'a> TryFrom<&'a LBNum> for u128
[src]
type Error = TryFromIntError
The type returned in the event of a conversion error.
fn try_from(op: &'a LBNum) -> Result<u128, TryFromIntError>
[src]
impl<'a> TryFrom<&'a LBNum> for i128
[src]
type Error = TryFromIntError
The type returned in the event of a conversion error.
fn try_from(op: &'a LBNum) -> Result<i128, TryFromIntError>
[src]
impl<'a> TryFrom<&'a LBNum> for usize
[src]
type Error = TryFromIntError
The type returned in the event of a conversion error.
fn try_from(op: &'a LBNum) -> Result<usize, TryFromIntError>
[src]
impl TryFrom<LBNum> for u8
[src]
type Error = TryFromIntError
The type returned in the event of a conversion error.
fn try_from(op: LBNum) -> Result<u8, TryFromIntError>
[src]
impl TryFrom<LBNum> for u16
[src]
type Error = TryFromIntError
The type returned in the event of a conversion error.
fn try_from(op: LBNum) -> Result<u16, TryFromIntError>
[src]
impl TryFrom<LBNum> for isize
[src]
type Error = TryFromIntError
The type returned in the event of a conversion error.
fn try_from(op: LBNum) -> Result<isize, TryFromIntError>
[src]
impl TryFrom<LBNum> for i16
[src]
type Error = TryFromIntError
The type returned in the event of a conversion error.
fn try_from(op: LBNum) -> Result<i16, TryFromIntError>
[src]
impl TryFrom<LBNum> for u32
[src]
type Error = TryFromIntError
The type returned in the event of a conversion error.
fn try_from(op: LBNum) -> Result<u32, TryFromIntError>
[src]
impl TryFrom<LBNum> for i32
[src]
type Error = TryFromIntError
The type returned in the event of a conversion error.
fn try_from(op: LBNum) -> Result<i32, TryFromIntError>
[src]
impl TryFrom<LBNum> for u64
[src]
type Error = TryFromIntError
The type returned in the event of a conversion error.
fn try_from(op: LBNum) -> Result<u64, TryFromIntError>
[src]
impl TryFrom<LBNum> for i64
[src]
type Error = TryFromIntError
The type returned in the event of a conversion error.
fn try_from(op: LBNum) -> Result<i64, TryFromIntError>
[src]
impl TryFrom<LBNum> for u128
[src]
type Error = TryFromIntError
The type returned in the event of a conversion error.
fn try_from(op: LBNum) -> Result<u128, TryFromIntError>
[src]
impl TryFrom<LBNum> for i128
[src]
type Error = TryFromIntError
The type returned in the event of a conversion error.
fn try_from(op: LBNum) -> Result<i128, TryFromIntError>
[src]
impl TryFrom<LBNum> for usize
[src]
type Error = TryFromIntError
The type returned in the event of a conversion error.
fn try_from(op: LBNum) -> Result<usize, TryFromIntError>
[src]
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
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,