Struct wayland_client::State
[−]
[src]
pub struct State { /* fields omitted */ }
A state store
This struct allows you to store various values in a special storage that will be made available to your proxy implementations.
Methods
impl State
[src]
fn insert<V: Any + 'static>(&mut self, value: V) -> StateToken<V>
[src]
Insert a new value in this state store
Returns a clonable token that you can later use to access this value.
fn get<V: Any + 'static>(&self, token: &StateToken<V>) -> &V
[src]
Access value previously inserted in this state store
Panics if the provided token corresponds to a value that was removed.
fn get_mut<V: Any + 'static>(&mut self, token: &StateToken<V>) -> &mut V
[src]
Mutably access value previously inserted in this state store
Panics if the provided token corresponds to a value that was removed.
fn remove<V: Any + 'static>(&mut self, token: StateToken<V>) -> V
[src]
Remove a value previously inserted in this state store
Panics if the provided token corresponds to a value that was already removed.