pub struct TextList { /* private fields */ }Expand description
The texts of a frame, each a TextDraw with its text, kept in one
buffer of characters, so that a frame that pushes the texts of the last
allocates nothing, formatted ones included (TextList::write).
Implementations§
Source§impl TextList
impl TextList
Sourcepub fn write(&mut self, draw: TextDraw, args: Arguments<'_>)
pub fn write(&mut self, draw: TextDraw, args: Arguments<'_>)
Adds the text args formats, drawn as draw says, with no
allocation once the list has held as much:
texts.write(draw, format_args!("Score {score}")). A text whose
formatting fails is left out.
Sourcepub fn iter(&self) -> impl ExactSizeIterator<Item = (&TextDraw, &str)> + '_
pub fn iter(&self) -> impl ExactSizeIterator<Item = (&TextDraw, &str)> + '_
The texts, in the order they were added.
Trait Implementations§
impl StructuralPartialEq for TextList
Auto Trait Implementations§
impl Forget for TextList
impl Freeze for TextList
impl Move for TextList
impl RefUnwindSafe for TextList
impl Send for TextList
impl Sync for TextList
impl Unpin for TextList
impl UnsafeUnpin for TextList
impl UnwindSafe for TextList
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