pub struct EventCollector { /* private fields */ }Implementations§
Source§impl EventCollector
impl EventCollector
pub fn new() -> Self
pub fn push(&mut self, event: AgentEvent)
pub fn events(&self) -> &[AgentEvent]
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn clear(&mut self)
pub fn to_json_lines(&self) -> Result<Vec<String>, Error>
pub fn output_json_lines(&self) -> Result<String, Error>
Trait Implementations§
Source§impl Debug for EventCollector
impl Debug for EventCollector
Source§impl Default for EventCollector
impl Default for EventCollector
Source§fn default() -> EventCollector
fn default() -> EventCollector
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for EventCollector
impl RefUnwindSafe for EventCollector
impl Send for EventCollector
impl Sync for EventCollector
impl Unpin for EventCollector
impl UnsafeUnpin for EventCollector
impl UnwindSafe for EventCollector
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