pub trait LineOutput: PineOutput {
// Required methods
fn add_line(&mut self, line: LineObject) -> usize;
fn get_line(&self, id: usize) -> Option<&LineObject>;
fn get_line_mut(&mut self, id: usize) -> Option<&mut LineObject>;
fn delete_line(&mut self, id: usize) -> bool;
}Expand description
Extension trait for line output
Required Methods§
Sourcefn add_line(&mut self, line: LineObject) -> usize
fn add_line(&mut self, line: LineObject) -> usize
Add a line and return its ID
Sourcefn get_line(&self, id: usize) -> Option<&LineObject>
fn get_line(&self, id: usize) -> Option<&LineObject>
Get a reference to a line by ID
Sourcefn get_line_mut(&mut self, id: usize) -> Option<&mut LineObject>
fn get_line_mut(&mut self, id: usize) -> Option<&mut LineObject>
Get a mutable reference to a line by ID
Sourcefn delete_line(&mut self, id: usize) -> bool
fn delete_line(&mut self, id: usize) -> bool
Delete a line 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".