Skip to main content

Counted

Struct Counted 

Source
struct Counted<'a, T: EventListener> {
    term: &'a mut Term<T>,
    total: usize,
    history: usize,
    scrolled: u64,
}
Expand description

One parse’s worth of counting.

Fields§

§term: &'a mut Term<T>§total: usize

The buffer’s line count when the parse started.

§history: usize

The configured scrollback cap, in lines.

§scrolled: u64

Lines this parse pushed out of a full buffer.

Implementations§

Source§

impl<'a, T: EventListener> Counted<'a, T>

Source

fn new(term: &'a mut Term<T>, history: usize) -> Self

Source

fn finish(self) -> u64

The lines that entered the buffer: the growth it shows, plus the lines it dropped once it was full.

Source

fn scrolled_linefeed(&mut self, scrolls: impl FnOnce(&mut Term<T>))

Forward one call, and count it when it scrolled a full screen: the cursor line is unchanged only when the linefeed scrolled the region, and only a region ending at the screen’s last line reaches the history.

Trait Implementations§

Source§

impl<T: EventListener> Handler for Counted<'_, T>

Source§

fn linefeed(&mut self)

Linefeed.
Source§

fn newline(&mut self)

Newline.
Source§

fn set_title(&mut self, a0: Option<String>)

OSC to set window title.
Source§

fn set_cursor_style(&mut self, a0: Option<CursorStyle>)

Set the cursor style.
Source§

fn set_cursor_shape(&mut self, a0: CursorShape)

Set the cursor shape.
Source§

fn input(&mut self, a0: char)

A character to be displayed.
Source§

fn goto(&mut self, a0: i32, a1: usize)

Set cursor to position.
Source§

fn goto_line(&mut self, a0: i32)

Set cursor to specific row.
Source§

fn goto_col(&mut self, a0: usize)

Set cursor to specific column.
Source§

fn insert_blank(&mut self, a0: usize)

Insert blank characters in current line starting from cursor.
Source§

fn move_up(&mut self, a0: usize)

Move cursor up rows.
Source§

fn move_down(&mut self, a0: usize)

Move cursor down rows.
Source§

fn identify_terminal(&mut self, a0: Option<char>)

Identify the terminal (should write back to the pty stream).
Source§

fn device_status(&mut self, a0: usize)

Report device status.
Source§

fn move_forward(&mut self, a0: usize)

Move cursor forward cols.
Source§

fn move_backward(&mut self, a0: usize)

Move cursor backward cols.
Source§

fn move_down_and_cr(&mut self, a0: usize)

Move cursor down rows and set to column 1.
Source§

fn move_up_and_cr(&mut self, a0: usize)

Move cursor up rows and set to column 1.
Source§

fn put_tab(&mut self, a0: u16)

Put count tabs.
Source§

fn backspace(&mut self)

Backspace count characters.
Source§

fn carriage_return(&mut self)

Carriage return.
Source§

fn bell(&mut self)

Ring the bell. Read more
Source§

fn substitute(&mut self)

Substitute char under cursor.
Source§

fn set_horizontal_tabstop(&mut self)

Set current position as a tabstop.
Source§

fn scroll_up(&mut self, a0: usize)

Scroll up rows rows.
Source§

fn scroll_down(&mut self, a0: usize)

Scroll down rows rows.
Source§

fn insert_blank_lines(&mut self, a0: usize)

Insert count blank lines.
Source§

fn delete_lines(&mut self, a0: usize)

Delete count lines.
Source§

fn erase_chars(&mut self, a0: usize)

Erase count chars in current line following cursor. Read more
Source§

fn delete_chars(&mut self, a0: usize)

Delete count chars. Read more
Source§

fn move_backward_tabs(&mut self, a0: u16)

Move backward count tabs.
Source§

fn move_forward_tabs(&mut self, a0: u16)

Move forward count tabs.
Source§

fn save_cursor_position(&mut self)

Save current cursor position.
Source§

fn restore_cursor_position(&mut self)

Restore cursor position.
Source§

fn clear_line(&mut self, a0: LineClearMode)

Clear current line.
Source§

fn clear_screen(&mut self, a0: ClearMode)

Clear screen.
Source§

fn clear_tabs(&mut self, a0: TabulationClearMode)

Clear tab stops.
Source§

fn set_tabs(&mut self, a0: u16)

Set tab stops at every interval.
Source§

fn reset_state(&mut self)

Reset terminal state.
Source§

fn reverse_index(&mut self)

Reverse Index. Read more
Source§

fn terminal_attribute(&mut self, a0: Attr)

Set a terminal attribute.
Source§

fn set_mode(&mut self, a0: Mode)

Set mode.
Source§

fn unset_mode(&mut self, a0: Mode)

Unset mode.
Source§

fn report_mode(&mut self, a0: Mode)

DECRPM - report mode.
Source§

fn set_private_mode(&mut self, a0: PrivateMode)

Set private mode.
Source§

fn unset_private_mode(&mut self, a0: PrivateMode)

Unset private mode.
Source§

fn report_private_mode(&mut self, a0: PrivateMode)

DECRPM - report private mode.
Source§

fn set_scrolling_region(&mut self, a0: usize, a1: Option<usize>)

DECSTBM - Set the terminal scrolling region.
Source§

fn set_keypad_application_mode(&mut self)

DECKPAM - Set keypad to applications mode (ESCape instead of digits).
Source§

fn unset_keypad_application_mode(&mut self)

DECKPNM - Set keypad to numeric mode (digits instead of ESCape seq).
Source§

fn set_active_charset(&mut self, a0: CharsetIndex)

Set one of the graphic character sets, G0 to G3, as the active charset. Read more
Source§

fn configure_charset(&mut self, a0: CharsetIndex, a1: StandardCharset)

Assign a graphic character set to G0, G1, G2 or G3. Read more
Source§

fn set_color(&mut self, a0: usize, a1: Rgb)

Set an indexed color value.
Source§

fn dynamic_color_sequence(&mut self, a0: String, a1: usize, a2: &str)

Respond to a color query escape sequence.
Source§

fn reset_color(&mut self, a0: usize)

Reset an indexed color to original value.
Source§

fn clipboard_store(&mut self, a0: u8, a1: &[u8])

Store data into clipboard.
Source§

fn clipboard_load(&mut self, a0: u8, a1: &str)

Load data from clipboard.
Source§

fn decaln(&mut self)

Run the decaln routine.
Source§

fn push_title(&mut self)

Push a title onto the stack.
Source§

fn pop_title(&mut self)

Pop the last title from the stack.
Source§

fn text_area_size_pixels(&mut self)

Report text area size in pixels.
Source§

fn text_area_size_chars(&mut self)

Report text area size in characters.
Set hyperlink.
Source§

fn report_keyboard_mode(&mut self)

Report current keyboard mode.
Source§

fn push_keyboard_mode(&mut self, a0: KeyboardModes)

Push keyboard mode into the keyboard mode stack.
Source§

fn pop_keyboard_modes(&mut self, a0: u16)

Pop the given amount of keyboard modes from the keyboard mode stack.
Source§

fn set_keyboard_mode( &mut self, a0: KeyboardModes, a1: KeyboardModesApplyBehavior, )

Set the keyboard mode using the given behavior.
Source§

fn set_modify_other_keys(&mut self, a0: ModifyOtherKeys)

Set XTerm’s [ModifyOtherKeys] option.
Source§

fn report_modify_other_keys(&mut self)

Report XTerm’s [ModifyOtherKeys] state. Read more
Source§

fn set_scp(&mut self, a0: ScpCharPath, a1: ScpUpdateMode)

§

fn set_mouse_cursor_icon(&mut self, _: CursorIcon)

Set mouse cursor icon.

Auto Trait Implementations§

§

impl<'a, T> !UnwindSafe for Counted<'a, T>

§

impl<'a, T> Freeze for Counted<'a, T>
where &'a mut Term<T>: Freeze,

§

impl<'a, T> RefUnwindSafe for Counted<'a, T>
where &'a mut Term<T>: RefUnwindSafe,

§

impl<'a, T> Send for Counted<'a, T>
where &'a mut Term<T>: Send,

§

impl<'a, T> Sync for Counted<'a, T>
where &'a mut Term<T>: Sync,

§

impl<'a, T> Unpin for Counted<'a, T>
where &'a mut Term<T>: Unpin,

§

impl<'a, T> UnsafeUnpin for Counted<'a, T>
where &'a mut Term<T>: UnsafeUnpin,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more