Skip to main content

IconShape

Trait IconShape 

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

    // 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<u32> = None

Default width of the SVG element in pixels.

Source

const HEIGHT: Option<u32> = None

Default height of the SVG element in pixels.

Source

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

Default fill color of the SVG element.

Source

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

Default stroke color of the SVG element.

Source

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

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

Required Methods§

Source

fn child_elements(&self) -> Element

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

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§