Struct shrev::EventHandler [] [src]

pub struct EventHandler<E> { /* fields omitted */ }

Event handler

Methods

impl<E> EventHandler<E> where
    E: Event
[src]

[src]

Create a new EventHandler with a default size of 200

[src]

Create a new EventHandler with the given max size

[src]

Register a reader.

To be able to read events, a reader id is required. This is because otherwise the handler wouldn't know where in the ringbuffer the reader has read to earlier. This information is stored in the reader id.

[src]

Write a number of events into its storage.

[src]

Write a single event into storage.

[src]

Read any events that have been written to storage since the readers last read.