pub trait FloatRepr<T>: Sealed<T> + Copy + Sized + Debug + Serialize + Eq + Ord + Hash {
    fn serialize(value: T) -> Result<Self, Error>;
    fn visit<'de, V>(&self, visitor: V) -> Result<V::Value, Error>
    where
        V: Visitor<'de>
; }
Expand description

Trait implemented by floating point types which can be used in a FloatPolicy. This is implemented by the type representing a float, typically a wrapper, and defines the protocol necessary to incorporate the floating point type T into the Key protocol.

Required Methods

Serialize impl for a floating point value.

Visit the current value.

Implementors