Skip to main content

LabelOutput

Trait LabelOutput 

Source
pub trait LabelOutput: PineOutput {
    // Required methods
    fn add_label(&mut self, label: Label) -> usize;
    fn get_label(&self, id: usize) -> Option<&Label>;
    fn get_label_mut(&mut self, id: usize) -> Option<&mut Label>;
    fn delete_label(&mut self, id: usize) -> bool;
}
Expand description

Extension trait for label output

Required Methods§

Source

fn add_label(&mut self, label: Label) -> usize

Add a label and return its ID

Source

fn get_label(&self, id: usize) -> Option<&Label>

Get a reference to a label by ID

Source

fn get_label_mut(&mut self, id: usize) -> Option<&mut Label>

Get a mutable reference to a label by ID

Source

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

Delete a label 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§