pub struct Bitstring(_);Expand description
A dynamically sized decimal number with enough precision to fit any Rust primitive number.
Implementations§
source§impl Bitstring
impl Bitstring
sourcepub fn try_from_le_bytes(bytes: &[u8]) -> Result<Self, Error>
pub fn try_from_le_bytes(bytes: &[u8]) -> Result<Self, Error>
Try create a decimal from the given buffer.
The buffer is assumed to be in little-endian byte-order already.
This method will fail if the buffer length is not a multiple of 4 bytes, or it’s too
big to fit in a Bitstring.
sourcepub fn as_le_bytes(&self) -> &[u8] ⓘ
pub fn as_le_bytes(&self) -> &[u8] ⓘ
Get a reference to the underlying bitstring buffer.
This buffer is always stored in little-endain byte-order, regardless of the endianness of the platform.
source§impl Bitstring
impl Bitstring
sourcepub fn is_sign_negative(&self) -> bool
pub fn is_sign_negative(&self) -> bool
Whether or not the sign bit is set.
sourcepub fn is_infinite(&self) -> bool
pub fn is_infinite(&self) -> bool
Whether or not the decimal is an infinity.
sourcepub fn is_quiet_nan(&self) -> bool
pub fn is_quiet_nan(&self) -> bool
Whether the decimal is a qNaN.
sourcepub fn is_signaling_nan(&self) -> bool
pub fn is_signaling_nan(&self) -> bool
Whether the decimal is a sNaN.