pub trait UiText: Default {
// Required methods
fn color(self, color: TextColor) -> Self;
fn font(self, font: TextFont) -> Self;
fn text(self, text: Text) -> Self;
// Provided methods
fn small(value: &str, font: &Handle<Font>) -> Self { ... }
fn medium(value: &str, font: &Handle<Font>) -> Self { ... }
fn large(value: &str, font: &Handle<Font>) -> Self { ... }
fn extra_large(value: &str, font: &Handle<Font>) -> Self { ... }
}
Expand description
Common interface for the text bundles
Required Methods§
Provided Methods§
Sourcefn extra_large(value: &str, font: &Handle<Font>) -> Self
fn extra_large(value: &str, font: &Handle<Font>) -> Self
Create a extra large text variant
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.