[][src]Function azul_css_parser::parse_layout_justify_content

pub fn parse_layout_justify_content<'a>(
    input: &'a str
) -> Result<LayoutJustifyContent, InvalidValueErr<'a>>

Parses a LayoutJustifyContent attribute from a &str

Example

assert_eq!(parse_layout_justify_content("flex-start"), Ok(LayoutJustifyContent::Start));
assert_eq!(parse_layout_justify_content("flex-end"), Ok(LayoutJustifyContent::End));
assert_eq!(parse_layout_justify_content("center"), Ok(LayoutJustifyContent::Center));
assert_eq!(parse_layout_justify_content("space-between"), Ok(LayoutJustifyContent::SpaceBetween));
assert_eq!(parse_layout_justify_content("space-around"), Ok(LayoutJustifyContent::SpaceAround));
assert_eq!(parse_layout_justify_content("space-evenly"), Ok(LayoutJustifyContent::SpaceEvenly));