pub enum Real {
Binary {
mantissa: f64,
base: u32,
exponent: i32,
enc_base: u8,
},
Infinity,
NegInfinity,
Zero,
}
Expand description
Variants
Binary
Non-special values
Infinity
Infinity (∞).
NegInfinity
Negative infinity (−∞).
Zero
Zero
Implementations
sourceimpl Real
impl Real
pub const fn with_enc_base(self, enc_base: u8) -> Self
sourcepub fn is_infinite(&self) -> bool
pub fn is_infinite(&self) -> bool
Returns true
if this value is positive infinity or negative infinity, and
false
otherwise.
Trait Implementations
sourceimpl<'a> CheckDerConstraints for Real
impl<'a> CheckDerConstraints for Real
fn check_constraints(any: &Any<'_>) -> Result<()>
sourceimpl ToDer for Real
impl ToDer for Real
sourcefn to_der_len(&self) -> Result<usize>
fn to_der_len(&self) -> Result<usize>
Get the length of the object, when encoded Read more
sourcefn write_der_header(&self, writer: &mut dyn Write) -> SerializeResult<usize>
fn write_der_header(&self, writer: &mut dyn Write) -> SerializeResult<usize>
Attempt to write the DER header to this writer.
sourcefn write_der_content(&self, writer: &mut dyn Write) -> SerializeResult<usize>
fn write_der_content(&self, writer: &mut dyn Write) -> SerializeResult<usize>
Attempt to write the DER content (all except header) to this writer.
sourcefn to_der_vec(&self) -> SerializeResult<Vec<u8>>
fn to_der_vec(&self) -> SerializeResult<Vec<u8>>
Write the DER encoded representation to a newly allocated Vec<u8>
.
sourcefn to_der_vec_raw(&self) -> SerializeResult<Vec<u8>>
fn to_der_vec_raw(&self) -> SerializeResult<Vec<u8>>
Similar to using to_vec
, but uses provided values without changes.
This can generate an invalid encoding for a DER object. Read more
sourcefn write_der(&self, writer: &mut dyn Write) -> SerializeResult<usize>
fn write_der(&self, writer: &mut dyn Write) -> SerializeResult<usize>
Attempt to write the DER encoded representation (header and content) into this writer. Read more
sourcefn write_der_raw(&self, writer: &mut dyn Write) -> SerializeResult<usize>
fn write_der_raw(&self, writer: &mut dyn Write) -> SerializeResult<usize>
Similar to using to_der
, but uses provided values without changes.
This can generate an invalid encoding for a DER object. Read more
impl DerAutoDerive for Real
impl StructuralPartialEq for Real
Auto Trait Implementations
impl RefUnwindSafe for Real
impl Send for Real
impl Sync for Real
impl Unpin for Real
impl UnwindSafe for Real
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more