Skip to main content

LineOutput

Trait LineOutput 

Source
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§

Source

fn add_line(&mut self, line: LineObject) -> usize

Add a line and return its ID

Source

fn get_line(&self, id: usize) -> Option<&LineObject>

Get a reference to a line by ID

Source

fn get_line_mut(&mut self, id: usize) -> Option<&mut LineObject>

Get a mutable reference to a line by ID

Source

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".

Implementors§