Skip to main content

Storage

Trait Storage 

Source
pub(crate) trait Storage {
    // Required methods
    fn event_info(&self, id: usize) -> Option<&EventInfo>;
    fn for_each<'a, F>(&'a self, f: F)
       where F: FnMut(&'a EventInfo);
}
Expand description

An interface for retrieving the EventInfo for a particular eventId.

Required Methods§

Source

fn event_info(&self, id: usize) -> Option<&EventInfo>

Gets the EventInfo for id if it exists.

Source

fn for_each<'a, F>(&'a self, f: F)
where F: FnMut(&'a EventInfo),

Invokes f once for each defined EventInfo in this storage.

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.

Implementations on Foreign Types§

Source§

impl Storage for Vec<EventInfo>

Source§

fn event_info(&self, id: usize) -> Option<&EventInfo>

Source§

fn for_each<'a, F>(&'a self, f: F)
where F: FnMut(&'a EventInfo),

Implementors§