pub struct Boxed<'a> { /* private fields */ }Expand description
Pairs a BoxStyle with the text it should render, so the pair can
implement Widget (which has no room for a text parameter). Build one
via BoxStyle::text.
Widget::render places the box at area’s top-left corner, sized to
the style’s own explicit-or-content-fit dimensions: it does not stretch
or clip to fill area. It always uses BoxStyle::render (not
BoxStyle::render_wrapped, behind the egc feature); for wrapped
content, call render_wrapped directly and
Surface::blit the result yourself.
Trait Implementations§
impl<'a> Copy for Boxed<'a>
Auto Trait Implementations§
impl<'a> Freeze for Boxed<'a>
impl<'a> RefUnwindSafe for Boxed<'a>
impl<'a> Send for Boxed<'a>
impl<'a> Sync for Boxed<'a>
impl<'a> Unpin for Boxed<'a>
impl<'a> UnsafeUnpin for Boxed<'a>
impl<'a> UnwindSafe for Boxed<'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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<C> WithAlpha for Cwhere
C: Copy,
impl<C> WithAlpha for Cwhere
C: Copy,
§fn with_alpha_first<A>(self, alpha: A) -> AlphaFirst<A, Self>
fn with_alpha_first<A>(self, alpha: A) -> AlphaFirst<A, Self>
Wraps
self with alpha, storing alpha before the color in memory
(see [AlphaFirst]).§fn with_alpha_last<A>(self, alpha: A) -> AlphaLast<A, Self>
fn with_alpha_last<A>(self, alpha: A) -> AlphaLast<A, Self>
Wraps
self with alpha, storing alpha after the color in memory
(see [AlphaLast]).