Trait iced::widget::svg::StyleSheet

pub trait StyleSheet {
    type Style: Default;

    // Required method
    fn appearance(&self, style: &Self::Style) -> Appearance;

    // Provided method
    fn hovered(&self, style: &Self::Style) -> Appearance { ... }
}
Available on crate feature svg only.
Expand description

The stylesheet of a svg.

Required Associated Types§

type Style: Default

The supported style of the StyleSheet.

Required Methods§

fn appearance(&self, style: &Self::Style) -> Appearance

Produces the Appearance of the svg.

Provided Methods§

fn hovered(&self, style: &Self::Style) -> Appearance

Produces the hovered Appearance of a svg content.

Implementations on Foreign Types§

§

impl StyleSheet for fn(_: &Theme) -> Appearance

§

type Style = Theme

§

fn appearance( &self, style: &<fn(_: &Theme) -> Appearance as StyleSheet>::Style ) -> Appearance

§

fn hovered( &self, style: &<fn(_: &Theme) -> Appearance as StyleSheet>::Style ) -> Appearance

Implementors§

§

impl StyleSheet for Theme

§

type Style = Svg