Trait vector::event::EventContainer

source ·
pub trait EventContainer: ByteSizeOf + EstimatedJsonEncodedSizeOf {
    type IntoIter: Iterator<Item = Event>;

    // Required methods
    fn len(&self) -> usize;
    fn into_events(self) -> Self::IntoIter;

    // Provided method
    fn is_empty(&self) -> bool { ... }
}
Expand description

The core trait to abstract over any type that may work as an array of events. This is effectively the same as the standard IntoIterator<Item = Event> implementations, but that would conflict with the base implementation for the type aliases below.

Required Associated Types§

source

type IntoIter: Iterator<Item = Event>

The type of Iterator used to turn this container into events.

Required Methods§

source

fn len(&self) -> usize

The number of events in this container.

source

fn into_events(self) -> Self::IntoIter

Turn this container into an iterator over Event.

Provided Methods§

source

fn is_empty(&self) -> bool

Is this container empty?

Implementations on Foreign Types§

source§

impl EventContainer for Vec<LogEvent>

source§

impl EventContainer for Vec<Metric>

Implementors§