statsig_rust/event_logging/event_queue/
queued_passthrough.rs

1use crate::event_logging::{
2    exposure_sampling::EvtSamplingDecision, statsig_event_internal::StatsigEventInternal,
3};
4
5use super::{
6    queued_event::{EnqueueOperation, QueuedEvent, QueuedExposure},
7    queued_gate_expo::EnqueueGateExpoOp,
8};
9
10pub struct EnqueuePassthroughOp {
11    pub event: StatsigEventInternal,
12}
13
14impl EnqueueOperation for EnqueuePassthroughOp {
15    fn as_exposure(&self) -> Option<&impl QueuedExposure<'_>> {
16        None::<&EnqueueGateExpoOp>
17    }
18
19    fn into_queued_event(self, _sampling_decision: EvtSamplingDecision) -> QueuedEvent {
20        QueuedEvent::Passthrough(self.event)
21    }
22}