Skip to main content

EventContainer

Trait EventContainer 

Source
pub trait EventContainer {
    // Required method
    fn event_count(&self) -> u64;

    // Provided method
    fn data_point_count(&self) -> u64 { ... }
}
Expand description

A container that holds events.

This trait is used as an incredibly generic way to expose the number of events within a “container,” which we loosely define to be anything that’s holding events in some form. This is primarily used to track the number of events dropped by RetryQueue (and PersistedQueue) when entries have to be dropped due to size limits.

Required Methods§

Source

fn event_count(&self) -> u64

Returns the number of events represented by this container.

Provided Methods§

Source

fn data_point_count(&self) -> u64

Returns the number of metric data points represented by this container.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementations on Foreign Types§

Source§

impl EventContainer for String

Implementors§