style

Function style 

Source
pub fn style(str: &str) -> Option<StyleAttr>
Expand description

Creates a new StyleAttr with the specified style. This function is a convenience method to create a StyleAttr instance with the style field set.

§Arguments

  • str - A string slice representing the inline style to be assigned.

§Returns

An Option<StyleAttr> containing the new StyleAttr with the style set, or None if the style is empty.