Trait wasm_cache::CacheKey

source ·
pub trait CacheKey<M = ()>: Debug + Invalidatable<M> + 'static {
    // Required methods
    fn any(&self) -> &(dyn Any + 'static);
    fn any_eq(&self, other: &dyn Any) -> bool;
    fn any_ord(&self, other: &dyn Any) -> Ordering;
    fn clone_boxed(&self) -> Box<dyn CacheKey<M>>;
}
Expand description

Trait for arbitrary cache keys.

Cache keys are arbitrary Rust types that are sortable and comparable.

Required Methods§

source

fn any(&self) -> &(dyn Any + 'static)

source

fn any_eq(&self, other: &dyn Any) -> bool

source

fn any_ord(&self, other: &dyn Any) -> Ordering

source

fn clone_boxed(&self) -> Box<dyn CacheKey<M>>

Trait Implementations§

source§

impl<M: 'static> Clone for Box<dyn CacheKey<M>>

source§

fn clone(&self) -> Self

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<M: 'static> Ord for dyn CacheKey<M>

source§

fn cmp(&self, other: &dyn CacheKey<M>) -> Ordering

This method returns an Ordering between self and other. Read more
source§

impl<M: 'static> PartialEq for dyn CacheKey<M>

source§

fn eq(&self, other: &dyn CacheKey<M>) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<M: 'static> PartialOrd for dyn CacheKey<M>

source§

fn partial_cmp(&self, other: &dyn CacheKey<M>) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl<M: 'static> Eq for dyn CacheKey<M>

Implementors§

source§

impl<M, T: Debug + Eq + Ord + Any + Clone + Invalidatable<M> + 'static> CacheKey<M> for T