[][src]Struct embedded_text::TextBox

pub struct TextBox<'a> {
    pub text: &'a str,
    pub bounds: Rectangle,
}

A piece of text with an associated area on the display

Fields

text: &'a str

The text to be displayed in this TextBox

bounds: Rectangle

The bounding box of this TextBox

Implementations

impl<'a> TextBox<'a>[src]

#[must_use]pub fn new(text: &'a str, bounds: Rectangle) -> Self[src]

Creates a new TextBox instance with a given bounding box.

#[must_use]pub fn into_styled<C, F, A>(
    self,
    style: TextBoxStyle<C, F, A>
) -> StyledTextBox<'a, C, F, A> where
    C: PixelColor,
    F: Font + Copy,
    A: TextAlignment
[src]

Attaches a textbox style to the textbox object.

Trait Implementations

impl<'_> Dimensions for TextBox<'_>[src]

impl<'_> Transform for TextBox<'_>[src]

Auto Trait Implementations

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

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.