pub struct Strings { /* private fields */ }Expand description
Perform text layout
let mut text = Strings::new(Size::new(10, 10), Wrap::Normal);
text.add_str("he");
text.add_str("ll");
text.add_str("o world");
let size = text.finish();
let lines = text.lines();Implementations§
Source§impl Strings
impl Strings
pub fn new(max: Size, wrap: Wrap) -> Self
Sourcepub fn add_str(&mut self, s: &str) -> ProcessResult
pub fn add_str(&mut self, s: &str) -> ProcessResult
Layout another string slice.
Sourcepub fn lines(
&self,
) -> impl Iterator<Item = Line<impl Iterator<Item = Segment<'_>>>>
pub fn lines( &self, ) -> impl Iterator<Item = Line<impl Iterator<Item = Segment<'_>>>>
Access the laid out strings.
See Strings for example.
pub fn set_style(&mut self, style: WidgetId)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Strings
impl RefUnwindSafe for Strings
impl Send for Strings
impl Sync for Strings
impl Unpin for Strings
impl UnsafeUnpin for Strings
impl UnwindSafe for Strings
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