pub struct SegmentLines {
pub lines: Vec<Vec<Segment>>,
pub new_lines: bool,
}Expand description
Lines of segments that render one after another, each ending in a
newline with new_lines. Port of rich.segment.SegmentLines.
Fields§
§lines: Vec<Vec<Segment>>§new_lines: boolImplementations§
Trait Implementations§
Source§impl Clone for SegmentLines
impl Clone for SegmentLines
Source§impl Debug for SegmentLines
impl Debug for SegmentLines
Source§impl Default for SegmentLines
impl Default for SegmentLines
Source§impl Renderable for SegmentLines
impl Renderable for SegmentLines
Source§fn rich_render(
&self,
_console: &Console,
_options: &ConsoleOptions,
) -> Vec<Segment>
fn rich_render( &self, _console: &Console, _options: &ConsoleOptions, ) -> Vec<Segment>
As Segments, the last line’s newline is left to the caller.
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. Port of
__rich_measure__. The default is what upstream’s Measurement.get
returns for a renderable without one: anything from nothing to the
whole width, (0, max_width).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 Freeze for SegmentLines
impl RefUnwindSafe for SegmentLines
impl Send for SegmentLines
impl Sync for SegmentLines
impl Unpin for SegmentLines
impl UnsafeUnpin for SegmentLines
impl UnwindSafe for SegmentLines
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