pub trait Icons: ThemeExt {
// Provided methods
fn icon(&self, icon: impl Into<Icon>) -> Svg { ... }
fn icon_at(&self, role: TextStyle, icon: impl Into<Icon>) -> Svg { ... }
}Provided Methods§
Sourcefn icon(&self, icon: impl Into<Icon>) -> Svg
fn icon(&self, icon: impl Into<Icon>) -> Svg
An icon at the ladder’s body step, in the plain text tone.
Both are defaults, not decisions: Svg is Styled, so a later
.size(..) or .text_color(..) wins, and a component’s own metric
stays with the component. What this buys is the floor —
icons::icon paints nothing when no colour is set anywhere,
because gpui resolves an svg’s tone from its own style and never
inherits one, so an icon with a forgotten text_color is invisible
rather than wrong.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".