pub struct WrappedCommandOutput {
pub sub_lines: Vec<Line>,
pub wrapped_lines_count: usize,
}Expand description
A wrapped cmd_output, only valid for the cmd_output it was computed for,
contains references to the start and end of lines wrapped for a
given width
Fields§
§sub_lines: Vec<Line>§wrapped_lines_count: usizein order to allow partial wrapping, and assuming the wrapped part didn’t change, we store the count of lines which were wrapped so that we may update starting from there
Implementations§
Source§impl WrappedCommandOutput
impl WrappedCommandOutput
Sourcepub fn new(cmd_output: &CommandOutput, width: u16) -> Self
pub fn new(cmd_output: &CommandOutput, width: u16) -> Self
compute a new wrapped cmd_output for a width and cmd_output.
width is the total area width, including the scrollbar.
Sourcepub fn update(&mut self, cmd_output: &CommandOutput, width: u16)
pub fn update(&mut self, cmd_output: &CommandOutput, width: u16)
Assuming the width is the same and the lines already handled didn’t change, wrap and add the lines which weren’t.
Auto Trait Implementations§
impl Freeze for WrappedCommandOutput
impl RefUnwindSafe for WrappedCommandOutput
impl Send for WrappedCommandOutput
impl Sync for WrappedCommandOutput
impl Unpin for WrappedCommandOutput
impl UnwindSafe for WrappedCommandOutput
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