pub struct Transcript { /* private fields */ }Expand description
Per-pane line transcript bounded by the effective history-limit.
Implementations§
Source§impl Transcript
impl Transcript
Sourcepub fn line_count(&self) -> usize
pub fn line_count(&self) -> usize
Returns the number of retained history lines.
Sourcepub fn set_limit(&mut self, limit: usize)
pub fn set_limit(&mut self, limit: usize)
Updates the retained line limit and evicts older lines if needed.
Sourcepub fn append_line(&mut self, line: impl Into<String>)
pub fn append_line(&mut self, line: impl Into<String>)
Appends one complete logical line to the transcript.
Sourcepub const fn lines(&self) -> &VecDeque<String>
pub const fn lines(&self) -> &VecDeque<String>
Returns the retained lines ordered from oldest to newest.
Sourcepub fn capture(&self, start: Option<i64>, end: Option<i64>) -> Vec<u8> ⓘ
pub fn capture(&self, start: Option<i64>, end: Option<i64>) -> Vec<u8> ⓘ
Captures an inclusive range of retained lines as newline-delimited bytes.
Non-negative bounds are zero-based indices into retained history.
Negative bounds count backward from the newest line, where -1 is the
newest retained line. Missing bounds mean the first or last retained line.
Out-of-range values clamp to the retained transcript. Reversed ranges are
swapped to match tmux’s buffer capture behavior.
Trait Implementations§
Source§impl Clone for Transcript
impl Clone for Transcript
Source§fn clone(&self) -> Transcript
fn clone(&self) -> Transcript
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 Debug for Transcript
impl Debug for Transcript
Source§impl Default for Transcript
impl Default for Transcript
impl Eq for Transcript
Source§impl PartialEq for Transcript
impl PartialEq for Transcript
impl StructuralPartialEq for Transcript
Auto Trait Implementations§
impl Freeze for Transcript
impl RefUnwindSafe for Transcript
impl Send for Transcript
impl Sync for Transcript
impl Unpin for Transcript
impl UnsafeUnpin for Transcript
impl UnwindSafe for Transcript
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