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<()>

Trait Implementations§

Source§

impl<T> FfiConverterArc<T> for dyn RecordedContext

Source§

const TYPE_ID_META: MetadataBuffer

Source§

type FfiType = *const c_void

Source§

fn lower(obj: Arc<Self>) -> Self::FfiType

Source§

fn try_lift(v: Self::FfiType) -> Result<Arc<Self>>

Source§

fn write(obj: Arc<Self>, buf: &mut Vec<u8>)

Source§

fn try_read(buf: &mut &[u8]) -> Result<Arc<Self>>

Source§

impl<T> LiftRef<T> for dyn RecordedContext

Implementors§