Skip to main content

Events

Trait Events 

Source
pub trait Events: Send + Sync {
    // Required methods
    fn all(&self) -> Vec<Event>;
    fn len(&self) -> usize;
    fn at(&self, index: usize) -> Option<&Event>;

    // Provided method
    fn is_empty(&self) -> bool { ... }
}
Available on crate feature sessions only.
Expand description

Trait for accessing events in a session.

Required Methods§

Source

fn all(&self) -> Vec<Event>

Returns all events in the session.

Source

fn len(&self) -> usize

Returns the number of events in the session.

Source

fn at(&self, index: usize) -> Option<&Event>

Returns the event at the given index, or None if out of bounds.

Provided Methods§

Source

fn is_empty(&self) -> bool

Returns true if the session has no events.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§