Struct shrev::EventChannel [] [src]

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

Event channel

Methods

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

[src]

Create a new EventChannel with a default size of 50

[src]

Create a new EventChannel with the given starting capacity.

[src]

Register a reader.

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

[src]

Deprecated

: please use iter_write instead

Write a slice of events into storage

[src]

Write an iterator of events into storage

[src]

Drain a vector of events into storage.

[src]

Write a single event into storage.

Important traits for StorageIterator<'a, T>
[src]

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

Trait Implementations

impl<E> Default for EventChannel<E> where
    E: Event
[src]

[src]

Returns the "default value" for a type. Read more

Auto Trait Implementations

impl<E> Send for EventChannel<E> where
    E: Send

impl<E> Sync for EventChannel<E> where
    E: Sync