Skip to main content

TableOutput

Trait TableOutput 

Source
pub trait TableOutput: PineOutput {
    // Required methods
    fn add_table(&mut self, table: Table) -> usize;
    fn get_table(&self, id: usize) -> Option<&Table>;
    fn get_table_mut(&mut self, id: usize) -> Option<&mut Table>;
    fn delete_table(&mut self, id: usize) -> bool;
}
Expand description

Extension trait for table output

Required Methods§

Source

fn add_table(&mut self, table: Table) -> usize

Add a table and return its ID

Source

fn get_table(&self, id: usize) -> Option<&Table>

Get a reference to a table by ID

Source

fn get_table_mut(&mut self, id: usize) -> Option<&mut Table>

Get a mutable reference to a table by ID

Source

fn delete_table(&mut self, id: usize) -> bool

Delete a table by ID and return true if it existed

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§