Skip to main content

IconSet

Trait IconSet 

Source
pub trait IconSet: Send + Sync {
    // Required method
    fn path_data(
        &self,
        icon: IconName,
        variant: IconVariant,
        size: u32,
    ) -> Option<&'static str>;
}
Expand description

A source of SVG path-data strings for named icons.

Implementations return the SVG d attribute value for the given icon, variant, and size. If a combination is unsupported, None is returned and callers should fall back to a default or skip rendering.

Required Methods§

Source

fn path_data( &self, icon: IconName, variant: IconVariant, size: u32, ) -> Option<&'static str>

Return the SVG path-data string (the d attribute) for the icon.

Returns None when the implementation does not support the requested combination of icon, variant, and size.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§