Skip to main content

Cachable

Trait Cachable 

Source
pub trait Cachable:
    Hash
    + Eq
    + Clone
    + Debug
    + Send
    + Sync
    + 'static { }
Expand description

Convenience trait for types that can be used in query cache keys.

This trait combines all the bounds needed for a type to be used as a field in a generic query struct: Hash + Eq + Clone + Debug + Send + Sync + 'static.

Use this trait bound on generic type parameters that appear in query fields. For type parameters that only appear in the output, use QueryOutput instead.

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.

Implementors§

Source§

impl<T: Hash + Eq + Clone + Debug + Send + Sync + 'static> Cachable for T