Trait druid::env::KeyLike

source ·
pub trait KeyLike<T> {
    // Required method
    fn changed(&self, old: &Env, new: &Env) -> bool;
}
Expand description

A trait for anything that can resolve a value of some type from the Env.

This is a generalization of the idea of KeyOrValue, mostly motivated by wanting to improve the API used for checking if items in the Env have changed.

Required Methods§

source

fn changed(&self, old: &Env, new: &Env) -> bool

Returns true if this item has changed between the old and new Env.

Implementors§

source§

impl<T> KeyLike<T> for KeyOrValue<T>

source§

impl<T: ValueType> KeyLike<T> for Key<T>