pub struct VerticalCenter { /* private fields */ }Expand description
Vertically centres a renderable in the options’ height (else the console
height). Mirrors the deprecated rich.align.VerticalCenter.
Implementations§
Trait Implementations§
Source§impl Renderable for VerticalCenter
impl Renderable for VerticalCenter
fn rich_render( &self, console: &Console, options: &ConsoleOptions, ) -> Vec<Segment>
Source§fn measure(&self, console: &Console, options: &ConsoleOptions) -> Measurement
fn measure(&self, console: &Console, options: &ConsoleOptions) -> Measurement
The
(minimum, maximum) cell width this renderable wants. The default
assumes the renderable fills the available width (e.g. Panel, Table);
Text overrides it with its content width so the top-level print path can
shrink to fit. Port of __rich_measure__ / Measurement.get.Source§fn fit_to_measurement(&self) -> bool
fn fit_to_measurement(&self) -> bool
Whether a top-level
Console::print shrinks this renderable to its
measured width. Upstream renders every top-level renderable at the full
console width, so the default is false; an extension may opt in.Auto Trait Implementations§
impl !RefUnwindSafe for VerticalCenter
impl !Send for VerticalCenter
impl !Sync for VerticalCenter
impl !UnwindSafe for VerticalCenter
impl Freeze for VerticalCenter
impl Unpin for VerticalCenter
impl UnsafeUnpin for VerticalCenter
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