pub struct EventResource { /* private fields */ }Expand description
Tracks event resource.
Implementations§
Source§impl EventResource
impl EventResource
Sourcepub fn create(&self, event: Event)
pub fn create(&self, event: Event)
Publish an event fire-and-forget in a background thread.
Errors are silently swallowed so that tracking failures never
interrupt the caller’s normal flow. Call EventResource::flush
before process exit to ensure all in-flight events are delivered.
§Panics
Does not panic. If event.metadata is not a JSON object the event is
silently dropped.
Auto Trait Implementations§
impl !Freeze for EventResource
impl !RefUnwindSafe for EventResource
impl Send for EventResource
impl Sync for EventResource
impl Unpin for EventResource
impl UnsafeUnpin for EventResource
impl !UnwindSafe for EventResource
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