pub struct Renderables { /* private fields */ }Expand description
A list of renderables rendered one after another. Mirrors
rich.containers.Renderables, which LogRender puts in its message column.
Implementations§
Source§impl Renderables
impl Renderables
Sourcepub fn new(renderables: Vec<Arc<dyn Renderable + Send + Sync>>) -> Self
pub fn new(renderables: Vec<Arc<dyn Renderable + Send + Sync>>) -> Self
A container of renderables, rendered in order.
Sourcepub fn append(&mut self, renderable: Arc<dyn Renderable + Send + Sync>)
pub fn append(&mut self, renderable: Arc<dyn Renderable + Send + Sync>)
Add a renderable to the end. Port of Renderables.append.
Sourcepub fn renderables(&self) -> &[Arc<dyn Renderable + Send + Sync>]
pub fn renderables(&self) -> &[Arc<dyn Renderable + Send + Sync>]
The contained renderables.
Trait Implementations§
Source§impl Clone for Renderables
impl Clone for Renderables
Source§impl Default for Renderables
impl Default for Renderables
Source§impl Renderable for Renderables
impl Renderable for Renderables
Source§fn rich_render(
&self,
console: &Console,
options: &ConsoleOptions,
) -> Vec<Segment>
fn rich_render( &self, console: &Console, options: &ConsoleOptions, ) -> Vec<Segment>
yield from self._renderables, each through Console.render.
Upstream’s renderables each end their output with a newline; this port’s separate lines instead, so each child’s output is joined to the previous one with a newline. A child that renders nothing adds no line.
Source§fn measure(&self, console: &Console, options: &ConsoleOptions) -> Measurement
fn measure(&self, console: &Console, options: &ConsoleOptions) -> Measurement
Port of Renderables.__rich_measure__: the widest minimum and maximum
of the children, or (1, 1) when there are none.
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.Source§fn vertical(&self) -> Option<VerticalAlign>
fn vertical(&self) -> Option<VerticalAlign>
The vertical alignment a
Table cell holding this renderable uses in
place of its column’s. Upstream reads getattr(renderable, "vertical", None); Align sets it.Source§fn print_end_line(&self, _options: &ConsoleOptions) -> bool
fn print_end_line(&self, _options: &ConsoleOptions) -> bool
Whether a top-level print ends this renderable’s last line. This
port’s renderables separate lines, where upstream’s end each line
with
"\n", so a print adds the final line break. A renderable
whose upstream output stops without one (Screen, LiveRender, a
Rule whose end has no newline) returns false, and the next
output continues its last line. options are the print’s options.Auto Trait Implementations§
impl !RefUnwindSafe for Renderables
impl !UnwindSafe for Renderables
impl Freeze for Renderables
impl Send for Renderables
impl Sync for Renderables
impl Unpin for Renderables
impl UnsafeUnpin for Renderables
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