Trait serde_hashkey::FloatRepr
source · [−]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
Implementors
impl FloatRepr<f32> for NeverFloat
impl FloatRepr<f32> for OrderedFloat<f32>
Available on crate feature
ordered-float only.impl FloatRepr<f64> for NeverFloat
impl FloatRepr<f64> for OrderedFloat<f64>
Available on crate feature
ordered-float only.