pub struct Chunk {
pub reference_time: OffsetDateTime,
pub events: Vec<Event>,
}Expand description
A chunk of metrics that represents all events emitted from the reference_time
through 65 seconds after that reference time.
Fields§
§reference_time: OffsetDateTimeThe start time of this chunk
events: Vec<Event>The events that have happened within 65 seconds of the reference time
Implementations§
Source§impl Chunk
impl Chunk
Sourcepub fn new(reference_time: OffsetDateTime) -> Self
pub fn new(reference_time: OffsetDateTime) -> Self
Create a new chunk from the provided time
Sourcepub fn memory_size(&self) -> usize
pub fn memory_size(&self) -> usize
A naive method for trying to determine the total memory size used by this chunk
Trait Implementations§
Source§impl Default for Chunk
Create a new chunk with the reference time being time::OffsetDateTime::now_utc()
impl Default for Chunk
Create a new chunk with the reference time being time::OffsetDateTime::now_utc()
Source§impl<'de> Deserialize<'de> for Chunk
impl<'de> Deserialize<'de> for Chunk
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for Chunk
Auto Trait Implementations§
impl Freeze for Chunk
impl RefUnwindSafe for Chunk
impl Send for Chunk
impl Sync for Chunk
impl Unpin for Chunk
impl UnsafeUnpin for Chunk
impl UnwindSafe for Chunk
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more