Skip to main content

SheetsState

Struct SheetsState 

Source
pub struct SheetsState {
    pub layout_cache: LayoutCache,
    /* private fields */
}

Fields§

§layout_cache: LayoutCache

Implementations§

Source§

impl SheetsState

Source

pub fn new(config: Arc<SheetsConfig>) -> Self

Source

pub fn init(&mut self, data: LoadedData) -> Result<()>

Source

pub fn load_file(&mut self, path: PathBuf) -> Result<()>

Source

pub fn resize(&mut self, width: usize, height: usize)

Source

pub fn scroll_up(&mut self)

Source

pub fn scroll_down(&mut self)

Source

pub fn scroll_left(&mut self)

Source

pub fn scroll_right(&mut self)

Source

pub fn page_up(&mut self)

Source

pub fn page_down(&mut self)

Source

pub fn half_page_up(&mut self)

Source

pub fn half_page_down(&mut self)

Source

pub fn go_to_top(&mut self)

Source

pub fn go_to_bottom(&mut self)

Source

pub fn go_to_first_col(&mut self)

Source

pub fn go_to_last_col(&mut self)

Source

pub fn go_to_top_visible(&mut self)

Source

pub fn go_to_middle_visible(&mut self)

Source

pub fn go_to_bottom_visible(&mut self)

Source

pub fn select_up(&mut self)

Source

pub fn select_down(&mut self)

Source

pub fn select_left(&mut self)

Source

pub fn select_right(&mut self)

Source

pub fn quit(&mut self)

Source

pub fn scroll_row(&self) -> usize

Source

pub fn selected_row(&self) -> usize

Source

pub fn selected_col(&self) -> usize

Source

pub fn col_offset(&self) -> usize

Source

pub fn max_col_offset(&self) -> usize

Source

pub fn row_count(&self) -> usize

Source

pub fn col_count(&self) -> usize

Source

pub fn headers(&self) -> Option<&Vec<String>>

Source

pub fn file_name(&self) -> &str

Source

pub fn visible_rows(&self) -> usize

Source

pub fn visible_cols(&self) -> usize

Source

pub fn visible_cols_from_offset(&self, offset: usize) -> usize

Source

pub fn row_range(&self) -> (usize, usize)

Source

pub fn get_cell(&self, row: usize, col: usize) -> Option<String>

Source

pub fn get_row(&self, row: usize) -> Option<Vec<String>>

Source

pub fn get_data_type(&self, col: usize) -> Option<DataType>

Source

pub fn at_top(&self) -> bool

Source

pub fn at_bottom(&self) -> bool

Source

pub fn add_status_message(&mut self, message: StatusMessage)

Source

pub fn get_status_messages(&self) -> Result<Vec<StatusMessage>>

Source

pub fn clear_status_messages(&mut self)

Source

pub fn set_view_mode(&mut self, mode: ViewMode)

Source

pub fn get_view_mode(&self) -> Result<ViewMode>

Source

pub fn set_search_query(&mut self, query: Option<String>)

Source

pub fn get_search_query(&self) -> Result<Option<String>>

Source

pub fn is_search_active(&self) -> bool

Source

pub fn search_direction(&self) -> SearchDirection

Source

pub fn search_append(&mut self, ch: char)

Source

pub fn search_backspace(&mut self)

Source

pub fn search_commit(&mut self) -> bool

Source

pub fn search_cancel(&mut self)

Source

pub fn search_next(&mut self) -> bool

Source

pub fn search_prev(&mut self) -> bool

Source

pub fn set_filter_expr(&mut self, expr: Option<String>)

Source

pub fn get_filter_expr(&self) -> Result<Option<String>>

Source

pub fn set_sort(&mut self, column: Option<String>, direction: SortDirection)

Source

pub fn get_sort_column(&self) -> Result<Option<String>>

Source

pub fn get_sort_direction(&self) -> Result<SortDirection>

Source

pub fn set_file_path(&mut self, path: PathBuf)

Source

pub fn get_file_path(&self) -> Result<Option<PathBuf>>

Source

pub fn set_file_mod_time(&mut self, time: Option<SystemTime>)

Source

pub fn get_file_mod_time(&self) -> Result<Option<SystemTime>>

Source

pub fn get_column_names(&self) -> Result<Vec<String>>

Source

pub fn get_row_count(&self) -> Result<usize>

Source

pub fn get_column_count(&self) -> Result<usize>

Source

pub fn get_selected_row(&self) -> Result<usize>

Source

pub fn get_selected_col(&self) -> Result<usize>

Source

pub fn get_row_range(&self) -> Result<(usize, usize)>

Source

pub fn get_width(&self) -> Result<usize>

Source

pub fn get_height(&self) -> Result<usize>

Source

pub fn get_file_name(&self) -> Result<String>

Source

pub fn get_config(&self) -> Result<SheetsConfig>

Source

pub fn set_config(&mut self, config: SheetsConfig)

Source

pub fn get_last_error(&self) -> Result<Option<String>>

Source

pub fn set_last_error(&mut self, error: Option<String>)

Source

pub fn clear_last_error(&mut self)

Source

pub fn set_show_row_numbers(&mut self, show: bool)

Source

pub fn get_show_row_numbers(&self) -> Result<bool>

Source

pub fn set_show_column_numbers(&mut self, show: bool)

Source

pub fn get_show_column_numbers(&self) -> Result<bool>

Source

pub fn set_show_grid_lines(&mut self, show: bool)

Source

pub fn get_show_grid_lines(&self) -> Result<bool>

Source

pub fn set_show_data_types(&mut self, show: bool)

Source

pub fn get_show_data_types(&self) -> Result<bool>

Source

pub fn is_file_modified(&self) -> Result<bool>

Trait Implementations§

Source§

impl Clone for SheetsState

Source§

fn clone(&self) -> SheetsState

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Default for SheetsState

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.