pub trait ColorResolver {
// Required method
fn resolve(&self, color: &ColorValue) -> Option<Rgba8>;
// Provided methods
fn color_snapshot(&self) -> BTreeMap<String, Rgba8> { ... }
fn resolve_typography(&self, role: &str) -> Option<ResolvedTypography> { ... }
fn resolve_length(&self, length: Length) -> Option<Length> { ... }
fn resolve_motion(&self) -> ThemeMotion { ... }
}Required Methods§
fn resolve(&self, color: &ColorValue) -> Option<Rgba8>
Provided Methods§
fn color_snapshot(&self) -> BTreeMap<String, Rgba8>
fn resolve_typography(&self, role: &str) -> Option<ResolvedTypography>
fn resolve_length(&self, length: Length) -> Option<Length>
fn resolve_motion(&self) -> ThemeMotion
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".