pub struct AnalyticsEmitter { /* private fields */ }Expand description
Analytics emitter
Implementations§
Source§impl AnalyticsEmitter
impl AnalyticsEmitter
Sourcepub fn with_beacon(beacon_url: String) -> Self
pub fn with_beacon(beacon_url: String) -> Self
Create with beacon endpoint
Sourcepub async fn emit(&self, event: AnalyticsEvent)
pub async fn emit(&self, event: AnalyticsEvent)
Emit an analytics event
Sourcepub async fn get_events(&self) -> Vec<AnalyticsEventRecord>
pub async fn get_events(&self) -> Vec<AnalyticsEventRecord>
Get all buffered events
Sourcepub fn set_beacon_url(&mut self, url: String)
pub fn set_beacon_url(&mut self, url: String)
Set beacon endpoint
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for AnalyticsEmitter
impl !RefUnwindSafe for AnalyticsEmitter
impl Send for AnalyticsEmitter
impl Sync for AnalyticsEmitter
impl Unpin for AnalyticsEmitter
impl UnsafeUnpin for AnalyticsEmitter
impl !UnwindSafe for AnalyticsEmitter
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