Skip to main content

parse_layout_box_sizing

Function parse_layout_box_sizing 

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

Parses a LayoutBoxSizing attribute from a &str

ยงExample

assert_eq!(parse_layout_box_sizing("content-box"), Ok(LayoutBoxSizing::ContentBox));
assert_eq!(parse_layout_box_sizing("border-box"), Ok(LayoutBoxSizing::BorderBox));