Struct embedded_text::TextBox
source · pub struct TextBox<'a> {
pub text: &'a str,
pub bounds: Rectangle,
}Expand description
A piece of text with an associated area on the display
Fields§
§text: &'a strThe text to be displayed in this TextBox
bounds: RectangleThe bounding box of this TextBox
Implementations§
source§impl<'a> TextBox<'a>
impl<'a> TextBox<'a>
sourcepub fn new(text: &'a str, bounds: Rectangle) -> Self
pub fn new(text: &'a str, bounds: Rectangle) -> Self
Creates a new TextBox instance with a given bounding box.
sourcepub fn into_styled<C, F, A>(
self,
style: TextBoxStyle<C, F, A>,
) -> StyledTextBox<'a, C, F, A>
pub fn into_styled<C, F, A>( self, style: TextBoxStyle<C, F, A>, ) -> StyledTextBox<'a, C, F, A>
Attaches a textbox style to the textbox object.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for TextBox<'a>
impl<'a> RefUnwindSafe for TextBox<'a>
impl<'a> Send for TextBox<'a>
impl<'a> Sync for TextBox<'a>
impl<'a> Unpin for TextBox<'a>
impl<'a> UnwindSafe for TextBox<'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