pub struct Text { /* private fields */ }
Expand description
A text label.
Implementations§
Source§impl Text
impl Text
Sourcepub fn new(content: impl Into<String>) -> Text
pub fn new(content: impl Into<String>) -> Text
Examples found in repository?
More examples
examples/loops.rs (line 15)
11 fn body(&self) -> Self::Body {
12 VStack::new((
13 HStack::new(
14 ForEach::new(["Hello", "World"], |s| {
15 Text::new(s)
16 }),
17 ),
18 HStack::new(
19 ForEach::new(0..10, |i| {
20 Text::new(format!("{i}"))
21 })
22 ),
23 ))
24 }
Trait Implementations§
impl Eq for Text
impl StructuralPartialEq for Text
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