Skip to main content

present

Function present 

Source
fn present(value: Option<&str>) -> Option<&str>
Expand description

Treats an empty identity field the same as a missing one.

The webapp builds the same subjects with JavaScript || fallbacks, where an empty string counts as missing. Doing the same here keeps both sides on one subject when a config has "" in an identity field.

§Arguments

  • value - Identity field from the config or environment.

§Returns

None if value is None or an empty string, otherwise value.