Skip to main content

parse_surface

Function parse_surface 

Source
pub fn parse_surface(query: &str) -> Option<AppSection>
Expand description

Parse a URL query string (with or without the leading ?) for a surface=<slug> parameter. Returns the matching AppSection or None if the param is missing / unrecognised.

Round-trips with surface_slug: parsing the output of surface_slug(x) returns Some(x) for every variant.