use crate::RetainedBytes;
use super::EventBatchLimits;
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
pub struct EventBatchSnapshot {
limits: EventBatchLimits,
events: usize,
retained_bytes: RetainedBytes,
}
impl EventBatchSnapshot {
pub(super) const fn new(
limits: EventBatchLimits,
events: usize,
retained_bytes: RetainedBytes,
) -> Self {
Self {
limits,
events,
retained_bytes,
}
}
pub const fn limits(self) -> EventBatchLimits {
self.limits
}
pub const fn events(self) -> usize {
self.events
}
pub const fn retained_bytes(self) -> RetainedBytes {
self.retained_bytes
}
}