Skip to main content

parse_tag

Function parse_tag 

Source
pub fn parse_tag(s: &str) -> Result<TagEntry, String>
Expand description

Parses a tag argument in the format “key=value” or “label”.

  • “location=building-a” -> TagEntry { key: “location”, value: Some(“building-a”) }
  • “critical” -> TagEntry { key: “critical”, value: None } (label)