Function parse_layout_justify_content

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

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));