Skip to main content

PluginStateKey

Trait PluginStateKey 

Source
pub trait PluginStateKey:
    Send
    + Sync
    + 'static {
    type State: Send + Sync + 'static;

    const KEY: &'static str;
}
Expand description

Typed key for plugin state stored in a PluginStateMap.

Implement this trait to define a plugin’s state type.

Required Associated Constants§

Source

const KEY: &'static str

Unique string key for serialization.

Required Associated Types§

Source

type State: Send + Sync + 'static

The state type stored for this key.

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§