#[non_exhaustive]pub struct Text {
pub text: Cow<'static, str>,
pub style: TextStyle,
pub padding: Pad,
}Expand description
Puts text onto the screen.
Responds with TextResponse.
§Examples
yakui::label("Default text label style");
yakui::text(32.0, "Custom font size");
let mut text = Text::new(32.0, "Title");
text.style.color = yakui::Color::RED;
text.show();Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.text: Cow<'static, str>§style: TextStyle§padding: PadImplementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Text
impl RefUnwindSafe for Text
impl Send for Text
impl Sync for Text
impl Unpin for Text
impl UnwindSafe for Text
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more