Skip to main content

Table

Struct Table 

Source
pub struct Table { /* private fields */ }

Implementations§

Source§

impl Table

Source

pub fn add_cols( &mut self, kwargs: Option<AddArgs>, ) -> Result<Option<Rc<RefCell<EventData>>>, String>

Add new cols with the provided item ids to the Table.

Source

pub fn add_num_cols( &mut self, kwargs: Option<AddNumArgs>, ) -> Result<Option<Rc<RefCell<EventData>>>, String>

Add a number of new cols with auto-generated item ids to the Table.

Source§

impl Table

Source

pub fn add_rows( &mut self, kwargs: Option<AddArgs>, ) -> Result<Option<Rc<RefCell<EventData>>>, String>

Add new rows with the provided item ids to the Table.

Source

pub fn add_num_rows( &mut self, kwargs: Option<AddNumArgs>, ) -> Result<Option<Rc<RefCell<EventData>>>, String>

Add a number of new rows with auto-generated item ids to the Table.

Source§

impl Table

Source§

impl Table

Source

pub fn align( &mut self, kwargs: Option<CellAlignArgs>, ) -> Result<Option<Rc<RefCell<EventData>>>, String>

Source

pub fn align_i( &mut self, kwargs: Option<CellAlignArgs>, ) -> Result<Option<Rc<RefCell<EventData>>>, String>

Source

pub fn align_h( &mut self, kwargs: Option<CellAlignArgs>, ) -> Result<Option<Rc<RefCell<EventData>>>, String>

Source§

impl Table

Source§

impl Table

Source§

impl Table

Source

pub fn get_data_iids<'a>( &'a self, kwargs: Option<GetDataIidsArgs>, ) -> Result<Vec<(String, Vec<(String, &'a Val)>)>, String>

Gets row data using an array of row ids or positions.

Source

pub fn get_data_yx<'a>( &'a self, kwargs: Option<GetDataYxArgs>, ) -> Result<Vec<(CellKey, &'a Val)>, String>

Gets table cell data using cell coordinates.

Source

pub fn get_data_span<'a>( &'a self, kwargs: Option<GetDataSpanArgs>, ) -> Result<Vec<Vec<&'a Val>>, String>

Gets data as a 2d array using a key.

Source§

impl Table

Source

pub fn get_data_iids_cloned( &self, kwargs: Option<GetDataIidsArgs>, ) -> Result<Vec<(String, Vec<(String, Val)>)>, String>

Gets row data using an array of row ids or positions.

Source

pub fn get_data_yx_cloned( &self, kwargs: Option<GetDataYxArgs>, ) -> Result<Vec<(CellKey, Val)>, String>

Gets table cell data using cell coordinates.

Source

pub fn get_data_span_cloned( &self, kwargs: Option<GetDataSpanArgs>, ) -> Result<Vec<Vec<Val>>, String>

Gets data as a 2d array using a key.

Source§

impl Table

Source

pub fn set_data( &mut self, kwargs: Option<SetDataArgs>, ) -> Result<Option<Rc<RefCell<EventData>>>, String>

Source

pub fn fill_data( &mut self, kwargs: Option<FillDataArgs>, ) -> Result<Option<Rc<RefCell<EventData>>>, String>

Sets table cell data using a key and a single value.

Source§

impl Table

Source

pub fn log_grid(&self) -> Result<(), String>

Source

pub fn log_index(&self) -> Result<(), String>

Source

pub fn log_header(&self) -> Result<(), String>

Source

pub fn log_selection(&self) -> Result<(), String>

Source

pub fn log_options(&self) -> Result<(), String>

Source

pub fn log_disp_rows(&self) -> Result<(), String>

Source

pub fn log_canvas_rows(&self) -> Result<(), String>

Source

pub fn log_disp_cols(&self) -> Result<(), String>

Source

pub fn log_canvas_cols(&self) -> Result<(), String>

Source

pub fn log_undo_stack(&self) -> Result<(), String>

Source

pub fn debug_grid(&self) -> String

Source

pub fn debug_index(&self) -> String

Source

pub fn debug_header(&self) -> String

Source

pub fn debug_selection(&self) -> String

Source

pub fn debug_options(&self) -> String

Source

pub fn debug_disp_rows(&self) -> String

Source

pub fn debug_canvas_rows(&self) -> String

Source

pub fn debug_disp_cols(&self) -> String

Source

pub fn debug_canvas_cols(&self) -> String

Source

pub fn debug_sizes(&self) -> String

Source

pub fn debug_tree_summary(&self) -> String

Source

pub fn debug_full(&self) -> String

Source§

impl Table

Source

pub fn del_cols( &mut self, kwargs: Option<DelArgs>, ) -> Result<Option<Rc<RefCell<EventData>>>, String>

Delete cols from the table using item ids.

Source

pub fn del_cols_pos( &mut self, kwargs: Option<DelPosArgs>, ) -> Result<Option<Rc<RefCell<EventData>>>, String>

Delete cols from the table using data positions (indices).

Source§

impl Table

Source

pub fn del_rows( &mut self, kwargs: Option<DelArgs>, ) -> Result<Option<Rc<RefCell<EventData>>>, String>

Delete rows from the table.

Source

pub fn del_rows_pos( &mut self, kwargs: Option<DelPosArgs>, ) -> Result<Option<Rc<RefCell<EventData>>>, String>

Delete rows from the table using data positions (indices).

Source§

impl Table

Source§

impl Table

Source§

impl Table

Source

pub fn insert( &mut self, kwargs: Option<InsertArgs>, ) -> Result<Option<Rc<RefCell<EventData>>>, String>

Insert multiple new rows into the table. If using tree mode then they can only be inserted under a single existing parent.

Source§

impl Table

Source

pub fn item( &mut self, kwargs: ItemArgs, ) -> Result<Option<Rc<RefCell<EventData>>>, String>

Modify a table item (row).

Source

pub fn get_item(&mut self, iid: String) -> Result<ItemResult, String>

Get information about an item (row).

Source

pub fn col( &mut self, kwargs: ItemColArgs, ) -> Result<Option<Rc<RefCell<EventData>>>, String>

Modify a table column (header item).

Source

pub fn get_col(&mut self, iid: String) -> Result<ItemColResult, String>

Get information about a column.

Source§

impl Table

Source

pub fn move_cols( &mut self, kwargs: Option<MoveArgs>, ) -> Result<Option<Rc<RefCell<EventData>>>, String>

Source§

impl Table

Source

pub fn move_items( &mut self, kwargs: MoveItemsArgs, ) -> Result<Option<Rc<RefCell<EventData>>>, String>

Source§

impl Table

Source

pub fn move_rows( &mut self, kwargs: Option<MoveArgs>, ) -> Result<Option<Rc<RefCell<EventData>>>, String>

Source§

impl Table

Source

pub fn note( &mut self, kwargs: Option<NoteArgs>, ) -> Result<Option<Rc<RefCell<EventData>>>, String>

Source

pub fn note_i( &mut self, kwargs: Option<NoteArgs>, ) -> Result<Option<Rc<RefCell<EventData>>>, String>

Source

pub fn note_h( &mut self, kwargs: Option<NoteArgs>, ) -> Result<Option<Rc<RefCell<EventData>>>, String>

Source

pub fn set_note( &mut self, kwargs: Option<SetNoteArgs>, ) -> Result<Option<Rc<RefCell<EventData>>>, String>

Source

pub fn set_note_i( &mut self, kwargs: Option<SetNoteArgs>, ) -> Result<Option<Rc<RefCell<EventData>>>, String>

Source

pub fn set_note_h( &mut self, kwargs: Option<SetNoteArgs>, ) -> Result<Option<Rc<RefCell<EventData>>>, String>

Source§

impl Table

Source

pub fn get_opts_default(&self) -> Result<Options, String>

Get the tables default settings as Options.

  • This does not return the current settings.
Source

pub fn get_opts(&self) -> &Options

Source§

impl Table

Source

pub fn set_opts( &mut self, options: Option<PartialOptions>, ) -> Result<(), String>

Source§

impl Table

Source§

impl Table

Source

pub fn readonly( &mut self, kwargs: Option<ReadonlyArgs>, ) -> Result<Option<Rc<RefCell<EventData>>>, String>

Source

pub fn readonly_i( &mut self, kwargs: Option<ReadonlyArgs>, ) -> Result<Option<Rc<RefCell<EventData>>>, String>

Source

pub fn readonly_h( &mut self, kwargs: Option<ReadonlyArgs>, ) -> Result<Option<Rc<RefCell<EventData>>>, String>

Source§

impl Table

Source

pub fn reset(&mut self, kwargs: Option<ResetArgs>) -> Result<(), String>

Reset the table.

Source§

impl Table

Source

pub fn selection_clear( &mut self, kwargs: Option<SelectionClearArgs>, ) -> Result<Option<Rc<RefCell<EventData>>>, String>

Clear all selections.

Source

pub fn select( &mut self, kwargs: Option<AddSelectionArgs>, ) -> Result<Option<Rc<RefCell<EventData>>>, String>

Create a selection box using a span. Uses displayed indices.

Source

pub fn select_rows( &mut self, kwargs: Option<SelectRowsColsArgs>, ) -> Result<Option<Rc<RefCell<EventData>>>, String>

Select rows using either item ids or row numbers. Uses data indices.

Source

pub fn select_cols( &mut self, kwargs: Option<SelectRowsColsArgs>, ) -> Result<Option<Rc<RefCell<EventData>>>, String>

Select cols using either item ids or col numbers. Uses data indices.

Source§

impl Table

Source

pub fn set_frozen_rows(&mut self, freeze: Vec<u64>) -> Result<(), String>

Source

pub fn set_frozen_cols(&mut self, freeze: Vec<u64>) -> Result<(), String>

Source§

impl Table

Source§

impl Table

Source

pub fn total_rows(&self) -> usize

Source

pub fn total_cols(&self) -> usize

Source§

impl Table

Source

pub fn tree_extend( &mut self, kwargs: Option<TreeExtendArgs>, ) -> Result<Option<Rc<RefCell<EventData>>>, String>

Extend the tree by adding new rows.

Source§

impl Table

Source

pub fn tree_open( &mut self, kwargs: Option<TreeOpenArgs>, ) -> Result<Option<Rc<RefCell<EventData>>>, String>

Sets items/rows to open. If used without args then all rows are opened.

Source

pub fn tree_close( &mut self, kwargs: Option<TreeOpenArgs>, ) -> Result<Option<Rc<RefCell<EventData>>>, String>

Sets items/rows to closed. If used without args then all rows are closed.

Source§

impl Table

Source§

impl Table

Source

pub fn new(default_row_dim: u64, options: Option<PartialOptions>) -> Self

Source§

impl Table

Source

pub fn acr_validate_partial_opts( partial: &mut PartialOptions, ) -> Result<(), String>

Source

pub fn cr_merge_opts(&mut self, partial: PartialOptions) -> Result<(), String>

Validates input before applying settings changes to table.

Source§

impl Table

Source

pub fn cr_key_to_span(&self, key: SpanKey) -> Result<Span, String>

Source

pub fn cr_span_to_string(&self, span: &Span) -> String

Convenience wrapper: table.cr_span_to_string(&my_span) → same as my_span.to_string().

Auto Trait Implementations§

§

impl !RefUnwindSafe for Table

§

impl !Send for Table

§

impl !Sync for Table

§

impl !UnwindSafe for Table

§

impl Freeze for Table

§

impl Unpin for Table

§

impl UnsafeUnpin for Table

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.