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: usizeThe buffer’s line count when the parse started.
history: usizeThe configured scrollback cap, in lines.
scrolled: u64Lines this parse pushed out of a full buffer.
Implementations§
Source§impl<'a, T: EventListener> Counted<'a, T>
impl<'a, T: EventListener> Counted<'a, T>
fn new(term: &'a mut Term<T>, history: usize) -> Self
Sourcefn finish(self) -> u64
fn finish(self) -> u64
The lines that entered the buffer: the growth it shows, plus the lines it dropped once it was full.
Sourcefn scrolled_linefeed(&mut self, scrolls: impl FnOnce(&mut Term<T>))
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>
impl<T: EventListener> Handler for Counted<'_, T>
Source§fn set_cursor_style(&mut self, a0: Option<CursorStyle>)
fn set_cursor_style(&mut self, a0: Option<CursorStyle>)
Set the cursor style.
Source§fn set_cursor_shape(&mut self, a0: CursorShape)
fn set_cursor_shape(&mut self, a0: CursorShape)
Set the cursor shape.
Source§fn insert_blank(&mut self, a0: usize)
fn insert_blank(&mut self, a0: usize)
Insert blank characters in current line starting from cursor.
Source§fn identify_terminal(&mut self, a0: Option<char>)
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)
fn device_status(&mut self, a0: usize)
Report device status.
Source§fn move_forward(&mut self, a0: usize)
fn move_forward(&mut self, a0: usize)
Move cursor forward
cols.Source§fn move_backward(&mut self, a0: usize)
fn move_backward(&mut self, a0: usize)
Move cursor backward
cols.Source§fn move_down_and_cr(&mut self, a0: usize)
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)
fn move_up_and_cr(&mut self, a0: usize)
Move cursor up
rows and set to column 1.Source§fn carriage_return(&mut self)
fn carriage_return(&mut self)
Carriage return.
Source§fn substitute(&mut self)
fn substitute(&mut self)
Substitute char under cursor.
Source§fn set_horizontal_tabstop(&mut self)
fn set_horizontal_tabstop(&mut self)
Set current position as a tabstop.
Source§fn scroll_down(&mut self, a0: usize)
fn scroll_down(&mut self, a0: usize)
Scroll down
rows rows.Source§fn insert_blank_lines(&mut self, a0: usize)
fn insert_blank_lines(&mut self, a0: usize)
Insert
count blank lines.Source§fn delete_lines(&mut self, a0: usize)
fn delete_lines(&mut self, a0: usize)
Delete
count lines.Source§fn erase_chars(&mut self, a0: usize)
fn erase_chars(&mut self, a0: usize)
Erase
count chars in current line following cursor. Read moreSource§fn delete_chars(&mut self, a0: usize)
fn delete_chars(&mut self, a0: usize)
Delete
count chars. Read moreSource§fn move_backward_tabs(&mut self, a0: u16)
fn move_backward_tabs(&mut self, a0: u16)
Move backward
count tabs.Source§fn move_forward_tabs(&mut self, a0: u16)
fn move_forward_tabs(&mut self, a0: u16)
Move forward
count tabs.Source§fn save_cursor_position(&mut self)
fn save_cursor_position(&mut self)
Save current cursor position.
Source§fn restore_cursor_position(&mut self)
fn restore_cursor_position(&mut self)
Restore cursor position.
Source§fn clear_line(&mut self, a0: LineClearMode)
fn clear_line(&mut self, a0: LineClearMode)
Clear current line.
Source§fn clear_screen(&mut self, a0: ClearMode)
fn clear_screen(&mut self, a0: ClearMode)
Clear screen.
Source§fn clear_tabs(&mut self, a0: TabulationClearMode)
fn clear_tabs(&mut self, a0: TabulationClearMode)
Clear tab stops.
Source§fn reset_state(&mut self)
fn reset_state(&mut self)
Reset terminal state.
Source§fn reverse_index(&mut self)
fn reverse_index(&mut self)
Reverse Index. Read more
Source§fn terminal_attribute(&mut self, a0: Attr)
fn terminal_attribute(&mut self, a0: Attr)
Set a terminal attribute.
Source§fn unset_mode(&mut self, a0: Mode)
fn unset_mode(&mut self, a0: Mode)
Unset mode.
Source§fn report_mode(&mut self, a0: Mode)
fn report_mode(&mut self, a0: Mode)
DECRPM - report mode.
Source§fn set_private_mode(&mut self, a0: PrivateMode)
fn set_private_mode(&mut self, a0: PrivateMode)
Set private mode.
Source§fn unset_private_mode(&mut self, a0: PrivateMode)
fn unset_private_mode(&mut self, a0: PrivateMode)
Unset private mode.
Source§fn report_private_mode(&mut self, a0: PrivateMode)
fn report_private_mode(&mut self, a0: PrivateMode)
DECRPM - report private mode.
Source§fn set_scrolling_region(&mut self, a0: usize, a1: Option<usize>)
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)
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)
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)
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)
fn configure_charset(&mut self, a0: CharsetIndex, a1: StandardCharset)
Assign a graphic character set to G0, G1, G2 or G3. Read more
Source§fn dynamic_color_sequence(&mut self, a0: String, a1: usize, a2: &str)
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)
fn reset_color(&mut self, a0: usize)
Reset an indexed color to original value.
Source§fn clipboard_store(&mut self, a0: u8, a1: &[u8])
fn clipboard_store(&mut self, a0: u8, a1: &[u8])
Store data into clipboard.
Source§fn clipboard_load(&mut self, a0: u8, a1: &str)
fn clipboard_load(&mut self, a0: u8, a1: &str)
Load data from clipboard.
Source§fn push_title(&mut self)
fn push_title(&mut self)
Push a title onto the stack.
Source§fn text_area_size_pixels(&mut self)
fn text_area_size_pixels(&mut self)
Report text area size in pixels.
Source§fn text_area_size_chars(&mut self)
fn text_area_size_chars(&mut self)
Report text area size in characters.
Source§fn set_hyperlink(&mut self, a0: Option<Hyperlink>)
fn set_hyperlink(&mut self, a0: Option<Hyperlink>)
Set hyperlink.
Source§fn report_keyboard_mode(&mut self)
fn report_keyboard_mode(&mut self)
Report current keyboard mode.
Source§fn push_keyboard_mode(&mut self, a0: KeyboardModes)
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)
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,
)
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)
fn set_modify_other_keys(&mut self, a0: ModifyOtherKeys)
Set XTerm’s [
ModifyOtherKeys] option.Source§fn report_modify_other_keys(&mut self)
fn report_modify_other_keys(&mut self)
Report XTerm’s [
ModifyOtherKeys] state. Read morefn set_scp(&mut self, a0: ScpCharPath, a1: ScpUpdateMode)
§fn set_mouse_cursor_icon(&mut self, _: CursorIcon)
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> 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