[][src]Struct bigbit::headbyte::HBNum

pub struct HBNum { /* fields omitted */ }

The Head Byte format, capable of storing integers and decimal fractions up to ±1.34078079e+281.

See the module-level documentation for more.

Methods

impl HBNum[src]

pub fn from_raw_parts(
    hb: HeadByte,
    exponent: Option<Exponent>,
    coefficients: Vec<u8>
) -> Self
[src]

#[must_use]pub fn headbyte(&self) -> HeadByte[src]

Returns the head byte.

The results of inspecting the head byte are reliable and always match the properties of the actual value of the entire number. For example, if has_exponent on the head byte always returns true, there always is an exponent byte to retreieve.

#[must_use]pub fn exponent(&self) -> Option<Exponent>[src]

Returns the exponent, or None if it's not used (mainly the case for integers).

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

Returns an iterator over the coefficients in little endian byte order.

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

Returns an iterator over the coefficients in big endian byte order.

Trait Implementations

impl Clone for HBNum[src]

Auto Trait Implementations

impl Send for HBNum

impl Sync for HBNum

impl Unpin for HBNum

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, 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.