Trait State

Source
pub trait State {
    // Required methods
    fn entries(&self) -> &HashMap<u16, EntryData>;
    fn entries_mut(&mut self) -> &mut HashMap<u16, EntryData>;
    fn create_entry(&mut self, data: EntryData) -> Result<Receiver<u16>>;
    fn delete_entry(&mut self, id: u16);
    fn update_entry(&mut self, id: u16, new_value: EntryValue);
    fn update_entry_flags(&mut self, id: u16, flags: u8);
    fn clear_entries(&mut self);
    fn add_callback(
        &mut self,
        callback_type: CallbackType,
        action: impl FnMut(&EntryData) + Send + 'static,
    );
}

Required Methods§

Source

fn entries(&self) -> &HashMap<u16, EntryData>

Source

fn entries_mut(&mut self) -> &mut HashMap<u16, EntryData>

Source

fn create_entry(&mut self, data: EntryData) -> Result<Receiver<u16>>

Source

fn delete_entry(&mut self, id: u16)

Source

fn update_entry(&mut self, id: u16, new_value: EntryValue)

Source

fn update_entry_flags(&mut self, id: u16, flags: u8)

Source

fn clear_entries(&mut self)

Source

fn add_callback( &mut self, callback_type: CallbackType, action: impl FnMut(&EntryData) + Send + 'static, )

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§