pub struct MeasurementProtocolDispatcher { /* private fields */ }Implementations§
Source§impl MeasurementProtocolDispatcher
impl MeasurementProtocolDispatcher
Sourcepub fn new(config: MeasurementProtocolConfig) -> AnalyticsResult<Self>
pub fn new(config: MeasurementProtocolConfig) -> AnalyticsResult<Self>
Creates a new dispatcher that will send events to the GA4 Measurement Protocol endpoint.
Sourcepub fn send_event(
&self,
client_id: &str,
event_name: &str,
params: &BTreeMap<String, String>,
) -> AnalyticsResult<()>
pub fn send_event( &self, client_id: &str, event_name: &str, params: &BTreeMap<String, String>, ) -> AnalyticsResult<()>
Sends a single analytics event via the measurement protocol.
The caller is responsible for providing a stable client_id, typically sourced from
Firebase Installations or another per-device identifier.
pub fn config(&self) -> &MeasurementProtocolConfig
Trait Implementations§
Source§impl Clone for MeasurementProtocolDispatcher
impl Clone for MeasurementProtocolDispatcher
Source§fn clone(&self) -> MeasurementProtocolDispatcher
fn clone(&self) -> MeasurementProtocolDispatcher
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for MeasurementProtocolDispatcher
impl !RefUnwindSafe for MeasurementProtocolDispatcher
impl Send for MeasurementProtocolDispatcher
impl Sync for MeasurementProtocolDispatcher
impl Unpin for MeasurementProtocolDispatcher
impl !UnwindSafe for MeasurementProtocolDispatcher
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