Struct pixel_widgets::text::Text [−][src]
pub struct Text<'a> {
pub text: Cow<'a, str>,
pub font: Font,
pub size: f32,
pub wrap: TextWrap,
pub color: Color,
}Expand description
A styled paragraph of text
Fields
text: Cow<'a, str>The text
font: FontFont to render the text with
size: f32Font size to render the text with
wrap: TextWrapWrapping style to use
color: ColorColor to render the text with
Implementations
impl<'t> Text<'t>[src]
impl<'t> Text<'t>[src]pub fn measure(&self, rect: Option<Rectangle>) -> Rectangle[src]
pub fn measure(&self, rect: Option<Rectangle>) -> Rectangle[src]Measure the size of the text. If a rectangle is supplied and the text wraps, the layout will stay within the width of the given rectangle.
Trait Implementations
Auto Trait Implementations
impl<'a> RefUnwindSafe for Text<'a>
impl<'a> Send for Text<'a>
impl<'a> Sync for Text<'a>
impl<'a> Unpin for Text<'a>
impl<'a> UnwindSafe for Text<'a>
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]pub fn borrow_mut(&mut self) -> &mut T[src]
pub fn borrow_mut(&mut self) -> &mut T[src]Mutably borrows from an owned value. Read more
impl<T> Pointable for T
impl<T> Pointable for Timpl<T> ToOwned for T where
T: Clone, [src]
impl<T> ToOwned for T where
T: Clone, [src]type Owned = T
type Owned = TThe resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn to_owned(&self) -> T[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)[src]
pub fn clone_into(&self, target: &mut T)[src]🔬 This is a nightly-only experimental API. (toowned_clone_into)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
impl<T> Any for T where
T: Any,
T: Any,
impl<T> CloneAny for T where
T: Any + Clone,
T: Any + Clone,