[−][src]Struct bigbit::headbyte::HBNum
The Head Byte format, capable of storing integers and fractions up to ±1.34078079e+281.
See the [module-level documentation][modhb] for more. [modhb]: index.html "bigbit::headbyte — the Head Byte format, capable of storing integers and fractions up to ±1.34078079e+281"
Methods
impl HBNum[src]
pub fn from_headbyte_and_followup(
hb: HeadByte,
followup: Vec<u8>
) -> Result<Self, ()>[src]
hb: HeadByte,
followup: Vec<u8>
) -> Result<Self, ()>
#[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]
&self
) -> impl Iterator<Item = u8> + DoubleEndedIterator + '_
Returns an iterator over the coefficients in little endian byte order.
pub fn coefficient_be_iter(
&self
) -> impl Iterator<Item = u8> + DoubleEndedIterator + '_[src]
&self
) -> impl Iterator<Item = u8> + DoubleEndedIterator + '_
Returns an iterator over the coefficients in big endian byte order.
Trait Implementations
impl Clone for HBNum[src]
fn clone(&self) -> HBNum[src]
fn clone_from(&mut self, source: &Self)1.0.0[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, 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>,