pub struct StatsigEventBuilder<S: State = Empty> { /* private fields */ }Expand description
Use builder syntax to set the inputs and finish with build().
Implementations§
Source§impl<S: State> StatsigEventBuilder<S>
impl<S: State> StatsigEventBuilder<S>
Sourcepub fn build(self) -> StatsigEventwhere
S: IsComplete,
pub fn build(self) -> StatsigEventwhere
S: IsComplete,
Finish building and return the requested object
Sourcepub fn event_name(
self,
value: impl Into<String>,
) -> StatsigEventBuilder<SetEventName<S>>where
S::EventName: IsUnset,
pub fn event_name(
self,
value: impl Into<String>,
) -> StatsigEventBuilder<SetEventName<S>>where
S::EventName: IsUnset,
Required.
Sourcepub fn value(self, value: StatsigEventValue) -> StatsigEventBuilder<SetValue<S>>where
S::Value: IsUnset,
pub fn value(self, value: StatsigEventValue) -> StatsigEventBuilder<SetValue<S>>where
S::Value: IsUnset,
Sourcepub fn maybe_value(
self,
value: Option<StatsigEventValue>,
) -> StatsigEventBuilder<SetValue<S>>where
S::Value: IsUnset,
pub fn maybe_value(
self,
value: Option<StatsigEventValue>,
) -> StatsigEventBuilder<SetValue<S>>where
S::Value: IsUnset,
Sourcepub fn time(self, value: StatsigEventTime) -> StatsigEventBuilder<SetTime<S>>where
S::Time: IsUnset,
pub fn time(self, value: StatsigEventTime) -> StatsigEventBuilder<SetTime<S>>where
S::Time: IsUnset,
Sourcepub fn maybe_time(
self,
value: Option<StatsigEventTime>,
) -> StatsigEventBuilder<SetTime<S>>where
S::Time: IsUnset,
pub fn maybe_time(
self,
value: Option<StatsigEventTime>,
) -> StatsigEventBuilder<SetTime<S>>where
S::Time: IsUnset,
Sourcepub fn user(self, value: User) -> StatsigEventBuilder<SetUser<S>>where
S::User: IsUnset,
pub fn user(self, value: User) -> StatsigEventBuilder<SetUser<S>>where
S::User: IsUnset,
Sourcepub fn maybe_user(self, value: Option<User>) -> StatsigEventBuilder<SetUser<S>>where
S::User: IsUnset,
pub fn maybe_user(self, value: Option<User>) -> StatsigEventBuilder<SetUser<S>>where
S::User: IsUnset,
Sourcepub fn metadata(
self,
value: HashMap<String, String>,
) -> StatsigEventBuilder<SetMetadata<S>>where
S::Metadata: IsUnset,
pub fn metadata(
self,
value: HashMap<String, String>,
) -> StatsigEventBuilder<SetMetadata<S>>where
S::Metadata: IsUnset,
Sourcepub fn maybe_metadata(
self,
value: Option<HashMap<String, String>>,
) -> StatsigEventBuilder<SetMetadata<S>>where
S::Metadata: IsUnset,
pub fn maybe_metadata(
self,
value: Option<HashMap<String, String>>,
) -> StatsigEventBuilder<SetMetadata<S>>where
S::Metadata: IsUnset,
Sourcepub fn secondary_exposures(
self,
value: Vec<ExposureEventMetadata>,
) -> StatsigEventBuilder<SetSecondaryExposures<S>>where
S::SecondaryExposures: IsUnset,
pub fn secondary_exposures(
self,
value: Vec<ExposureEventMetadata>,
) -> StatsigEventBuilder<SetSecondaryExposures<S>>where
S::SecondaryExposures: IsUnset,
Sourcepub fn maybe_secondary_exposures(
self,
value: Option<Vec<ExposureEventMetadata>>,
) -> StatsigEventBuilder<SetSecondaryExposures<S>>where
S::SecondaryExposures: IsUnset,
pub fn maybe_secondary_exposures(
self,
value: Option<Vec<ExposureEventMetadata>>,
) -> StatsigEventBuilder<SetSecondaryExposures<S>>where
S::SecondaryExposures: IsUnset,
Sourcepub fn statsig_metadata(
self,
value: StatsigMetadata,
) -> StatsigEventBuilder<SetStatsigMetadata<S>>where
S::StatsigMetadata: IsUnset,
pub fn statsig_metadata(
self,
value: StatsigMetadata,
) -> StatsigEventBuilder<SetStatsigMetadata<S>>where
S::StatsigMetadata: IsUnset,
Sourcepub fn maybe_statsig_metadata(
self,
value: Option<StatsigMetadata>,
) -> StatsigEventBuilder<SetStatsigMetadata<S>>where
S::StatsigMetadata: IsUnset,
pub fn maybe_statsig_metadata(
self,
value: Option<StatsigMetadata>,
) -> StatsigEventBuilder<SetStatsigMetadata<S>>where
S::StatsigMetadata: IsUnset,
Auto Trait Implementations§
impl<S> Freeze for StatsigEventBuilder<S>
impl<S> RefUnwindSafe for StatsigEventBuilder<S>
impl<S> Send for StatsigEventBuilder<S>
impl<S> Sync for StatsigEventBuilder<S>
impl<S> Unpin for StatsigEventBuilder<S>
impl<S> UnwindSafe for StatsigEventBuilder<S>
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more