Struct Counter

Source
pub struct Counter {
    pub counts: HashMap<&'static str, i32>,
    pub last_params: HashMap<&'static str, Vec<u32>>,
    pub last_strings: HashMap<&'static str, String>,
    pub last_private: Option<bool>,
}

Fields§

§counts: HashMap<&'static str, i32>§last_params: HashMap<&'static str, Vec<u32>>§last_strings: HashMap<&'static str, String>§last_private: Option<bool>

Implementations§

Source§

impl Counter

Source

pub fn new() -> Self

Source

pub fn get_count(&self, name: &str) -> i32

Source

pub fn get_last_params(&self, name: &str) -> Option<&Vec<u32>>

Source

pub fn get_last_string(&self, name: &str) -> Option<&String>

Source

pub fn get_last_private(&self) -> Option<bool>

Trait Implementations§

Source§

impl ParserListener for Counter

Source§

fn alignment_display(&mut self)

Source§

fn define_charset(&mut self, code: &str, mode: &str)

Source§

fn reset(&mut self)

Source§

fn index(&mut self)

Source§

fn linefeed(&mut self)

Source§

fn reverse_index(&mut self)

Source§

fn set_tab_stop(&mut self)

Source§

fn save_cursor(&mut self)

Source§

fn restore_cursor(&mut self)

Source§

fn shift_out(&mut self)

Source§

fn shift_in(&mut self)

Source§

fn bell(&mut self)

Source§

fn backspace(&mut self)

Source§

fn tab(&mut self)

Source§

fn cariage_return(&mut self)

Source§

fn draw(&mut self, string: &str)

Source§

fn insert_characters(&mut self, count: Option<u32>)

Source§

fn cursor_up(&mut self, count: Option<u32>)

Source§

fn cursor_down(&mut self, count: Option<u32>)

Source§

fn cursor_forward(&mut self, count: Option<u32>)

Source§

fn cursor_back(&mut self, count: Option<u32>)

Source§

fn cursor_down1(&mut self, count: Option<u32>)

Source§

fn cursor_up1(&mut self, count: Option<u32>)

Source§

fn cursor_to_column(&mut self, column: Option<u32>)

Source§

fn cursor_position(&mut self, line: Option<u32>, column: Option<u32>)

Source§

fn erase_in_display(&mut self, how: Option<u32>, private: Option<bool>)

Source§

fn erase_in_line(&mut self, how: Option<u32>, private: Option<bool>)

Source§

fn insert_lines(&mut self, count: Option<u32>)

Source§

fn delete_lines(&mut self, count: Option<u32>)

Source§

fn delete_characters(&mut self, count: Option<u32>)

Source§

fn erase_characters(&mut self, count: Option<u32>)

Source§

fn report_device_attributes(&mut self, mode: Option<u32>, private: Option<bool>)

Source§

fn cursor_to_line(&mut self, line: Option<u32>)

Source§

fn clear_tab_stop(&mut self, how: Option<u32>)

Source§

fn set_mode(&mut self, modes: &[u32], private: bool)

Source§

fn reset_mode(&mut self, modes: &[u32], private: bool)

Source§

fn select_graphic_rendition(&mut self, modes: &[u32])

Source§

fn set_title(&mut self, title: &str)

Source§

fn set_icon_name(&mut self, icon_name: &str)

Source§

fn display(&mut self) -> Vec<String>

Source§

fn set_margins(&mut self, _top: Option<u32>, _bottom: Option<u32>)

Source§

fn escape_dispatch(&mut self, escape_command: &str)

Source§

fn basic_dispatch(&mut self, basic_command: &str)

Source§

fn csi_dispatch(&mut self, csi_command: &str, params: &[u32], is_private: bool)

Auto Trait Implementations§

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.

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 = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.