pub struct Text<'a> { /* private fields */ }Implementations§
Source§impl<'a> Text<'a>
impl<'a> Text<'a>
pub fn new(font: &'a Face) -> Self
pub fn text(&mut self, str: impl Into<String>) -> &mut Self
pub fn font(&mut self, font: &'a Face) -> &mut Self
pub fn color(&mut self, color: Color) -> &mut Self
pub fn height(&mut self, height: isize) -> &mut Self
Sourcepub fn reallocate(&mut self)
pub fn reallocate(&mut self)
Use when the size of text
pub fn render(&mut self) -> &Surface
Trait Implementations§
impl<'a> StructuralPartialEq for Text<'a>
Auto Trait Implementations§
impl<'a> Freeze for Text<'a>
impl<'a> RefUnwindSafe for Text<'a>
impl<'a> !Send for Text<'a>
impl<'a> !Sync for Text<'a>
impl<'a> Unpin for Text<'a>
impl<'a> UnwindSafe for Text<'a>
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