Skip to main content

Storage

Trait Storage 

Source
pub(crate) trait Storage {
    // Required methods
    fn event_info(&self, id: usize) -> Option<&EventInfo>;
    fn iter(&self) -> impl Iterator<Item = &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 iter(&self) -> impl Iterator<Item = &EventInfo>

Returns an iterator over the storage.

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 Storage for Vec<EventInfo>

Source§

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

Source§

fn iter(&self) -> impl Iterator<Item = &EventInfo>

Implementors§