[][src]Struct serde_hashkey::RejectFloatPolicy

pub struct RejectFloatPolicy(_);

A float serialization policy which rejects any attempt to serialize a float with an error. This policy is used by the to_key function.

Examples

use serde_hashkey::{Key, Float, to_key};

assert!(to_key(&"John Doe").is_ok());
assert!(to_key(&42.42f32).is_err());

Trait Implementations

impl Clone for RejectFloatPolicy[src]

impl Copy for RejectFloatPolicy[src]

impl Debug for RejectFloatPolicy[src]

impl Eq for RejectFloatPolicy[src]

impl FloatPolicy for RejectFloatPolicy[src]

type F32 = NeverFloat

The type encapsulating a 32-bit float, or f32.

type F64 = NeverFloat

The type encapsulating a 64-bit float, or f64.

impl Hash for RejectFloatPolicy[src]

impl Ord for RejectFloatPolicy[src]

impl PartialEq<RejectFloatPolicy> for RejectFloatPolicy[src]

impl PartialOrd<RejectFloatPolicy> for RejectFloatPolicy[src]

impl StructuralEq for RejectFloatPolicy[src]

impl StructuralPartialEq for RejectFloatPolicy[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.