Skip to main content

ReactiveMapKey

Trait ReactiveMapKey 

Source
pub trait ReactiveMapKey:
    AsRef<str>
    + Clone
    + Hash
    + Eq
    + Send
    + Sync
    + 'static {
    // Required method
    fn read(name: &str) -> Option<Self>;
}

Required Methods§

Source

fn read(name: &str) -> Option<Self>

The key a stored name stands for, or None where that name is not one.

The only direction that can fail, and the only one that allocates. It is walked once per entry when a map is built from the store, and never on a read.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl ReactiveMapKey for String

Source§

fn read(name: &str) -> Option<Self>

Implementors§

Source§

impl ReactiveMapKey for SmolStr

Source§

impl<T> ReactiveMapKey for Id<T>
where T: Display + FromStr + Clone + Send + Sync + 'static,