Trait FPFormat

Source
pub trait FPFormat:
    Neg<Output = Self>
    + Sized
    + Copy {
    // Required method
    fn from_literal(literal: FloatLiteral) -> ConversionResult<Self>;
}
Expand description

Trait to describe conversion to floating point formats.

Required Methods§

Source

fn from_literal(literal: FloatLiteral) -> ConversionResult<Self>

Convert a literal to this format. This is a hack so that we can use a macro to implement conversions.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl FPFormat for f32

Source§

impl FPFormat for f64

Implementors§