Skip to main content

event_data

Function event_data 

Source
pub fn event_data<I, K, V>(name: &str, props: I) -> Vec<(String, String)>
where I: IntoIterator<Item = (K, V)>, K: AsRef<str>, V: Into<Value>,
Expand description

The same attributes as event_attrs, as (name, value) pairs that are not escaped yet. Handy for template engines and builders that set attributes one by one and escape them for you.

  • Prop keys are made lowercase. Anything that is not a-z, 0-9 or _ becomes _, so "Report Type" becomes report_type. Keys are cut to 64 characters.
  • At most 30 props. Values become text: true, false, numbers as written, lists joined with commas. None and Value::Null are left out. Values are cut to 500 characters.

Returns an empty list for an empty name.