pub struct RatatuiWidget<'a> { /* private fields */ }Expand description
A stateless Ratatui widget backed by an Urushi BlockStyle.
This is the single-block case of ViewWidget. It constructs
Block(style, Text(content, …)), while this
widget resolves under the target Rect’s width and height constraints.
Implementations§
Source§impl<'a> RatatuiWidget<'a>
impl<'a> RatatuiWidget<'a>
Sourcepub const fn new(content: &'a str, style: &'a BlockStyle) -> Self
pub const fn new(content: &'a str, style: &'a BlockStyle) -> Self
Creates a widget that renders content with style.
Sourcepub const fn cell_write_mode(self, mode: CellWriteMode) -> Self
pub const fn cell_write_mode(self, mode: CellWriteMode) -> Self
Selects how drawn cells combine with content already in the buffer.
Trait Implementations§
Source§impl<'a> Clone for RatatuiWidget<'a>
impl<'a> Clone for RatatuiWidget<'a>
Source§fn clone(&self) -> RatatuiWidget<'a>
fn clone(&self) -> RatatuiWidget<'a>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'a> Debug for RatatuiWidget<'a>
impl<'a> Debug for RatatuiWidget<'a>
Source§impl Widget for &RatatuiWidget<'_>
impl Widget for &RatatuiWidget<'_>
Source§impl Widget for RatatuiWidget<'_>
impl Widget for RatatuiWidget<'_>
impl<'a> Copy for RatatuiWidget<'a>
Auto Trait Implementations§
impl<'a> Freeze for RatatuiWidget<'a>
impl<'a> RefUnwindSafe for RatatuiWidget<'a>
impl<'a> Send for RatatuiWidget<'a>
impl<'a> Sync for RatatuiWidget<'a>
impl<'a> Unpin for RatatuiWidget<'a>
impl<'a> UnsafeUnpin for RatatuiWidget<'a>
impl<'a> UnwindSafe for RatatuiWidget<'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,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more