nimbus::stateful::targeting

Trait RecordedContext

Source
pub trait RecordedContext: Send + Sync {
    // Required methods
    fn to_json(&self) -> Map<String, Value>;
    fn get_event_queries(&self) -> HashMap<String, String>;
    fn set_event_query_values(&self, event_query_values: HashMap<String, f64>);
    fn record(&self);
}

Required Methods§

Source

fn to_json(&self) -> Map<String, Value>

Returns a JSON representation of the context object

This method will be implemented in foreign code, i.e: Kotlin, Swift, Python, etc…

Source

fn get_event_queries(&self) -> HashMap<String, String>

Returns a HashMap representation of the event queries that will be used in the targeting context

This method will be implemented in foreign code, i.e: Kotlin, Swift, Python, etc…

Source

fn set_event_query_values(&self, event_query_values: HashMap<String, f64>)

Sets the object’s internal value for the event query values

This method will be implemented in foreign code, i.e: Kotlin, Swift, Python, etc…

Source

fn record(&self)

Records the context object to Glean

This method will be implemented in foreign code, i.e: Kotlin, Swift, Python, etc…

Implementations§

Source§

impl dyn RecordedContext

Source

pub fn execute_queries( &self, nimbus_targeting_helper: &NimbusTargetingHelper, ) -> Result<HashMap<String, f64>>

Source

pub fn validate_queries(&self) -> Result<()>

Implementors§