pub trait ExtraKeys {
    const ALLOWED_KEYS: &'static [&'static str];

    fn into_ffi_extra(self) -> HashMap<String, String>;
}
Expand description

Extra keys for events.

Extra keys need to be pre-defined and map to a string representation.

For user-defined EventMetrics these will be defined as structs. Each extra key will be a field in that struct. Each field will correspond to an entry in the ALLOWED_KEYS list. The Glean SDK requires the keys as strings for submission in pings, whereas in code we want to provide users a type to work with (e.g. to avoid typos or misuse of the API).

Required Associated Constants§

List of allowed extra keys as strings.

Required Methods§

Convert the event extras into 2 lists:

  1. The list of extra key indices. Unset keys will be skipped.
  2. The list of extra values.

Implementors§