Skip to main content

IconShape

Trait IconShape 

Source
pub trait IconShape:
    Clone
    + PartialEq
    + 'static {
    const TITLE: Option<&'static str> = None;
    const WIDTH: Option<&'static str> = None;
    const HEIGHT: Option<&'static str> = None;
    const FILL: Option<&'static str> = _;
    const STROKE: Option<&'static str> = None;
    const STROKE_WIDTH: Option<&'static str> = None;
    const STROKE_LINE_CAP: Option<&'static str> = None;
    const STROKE_LINE_JOIN: Option<&'static str> = None;
    const VIEW_BOX: Option<&'static str> = None;
    const XMLNS: Option<&'static str> = _;

    // Required method
    fn child_elements(&self) -> Element;
}
Expand description

This trait is used to override IconProps.

Implements this trait when adding a new real icon.

Provided Associated Constants§

Source

const TITLE: Option<&'static str> = None

Default title text for the SVG element.

Source

const WIDTH: Option<&'static str> = None

Default width of the SVG element in pixels.

Source

const HEIGHT: Option<&'static str> = None

Default height of the SVG element in pixels.

Source

const FILL: Option<&'static str> = _

Default fill color of the SVG element.

Source

const STROKE: Option<&'static str> = None

Default stroke color of the SVG element.

Source

const STROKE_WIDTH: Option<&'static str> = None

Default stroke width of the SVG element (e.g., “2”).

Source

const STROKE_LINE_CAP: Option<&'static str> = None

Default stroke line cap style (e.g., “round”, “butt”, “square”).

Source

const STROKE_LINE_JOIN: Option<&'static str> = None

Default stroke line join style (e.g., “round”, “miter”, “bevel”).

Source

const VIEW_BOX: Option<&'static str> = None

Default view box string (e.g., “0 0 24 24”).

Source

const XMLNS: Option<&'static str> = _

Default XML namespace for the SVG element. Falls back to "http://www.w3.org/2000/svg" if not set.

Required Methods§

Source

fn child_elements(&self) -> Element

Returns the SVG child elements (paths, circles, etc.) that define the icon shape.

§Errors

Returns Err if rendering the child elements fails.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§