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