pub trait BoxOutput: PineOutput {
// Required methods
fn add_box(&mut self, box_obj: PineBox) -> usize;
fn get_box(&self, id: usize) -> Option<&PineBox>;
fn get_box_mut(&mut self, id: usize) -> Option<&mut PineBox>;
fn delete_box(&mut self, id: usize) -> bool;
}Expand description
Extension trait for box output
Required Methods§
Sourcefn get_box_mut(&mut self, id: usize) -> Option<&mut PineBox>
fn get_box_mut(&mut self, id: usize) -> Option<&mut PineBox>
Get a mutable reference to a box by ID
Sourcefn delete_box(&mut self, id: usize) -> bool
fn delete_box(&mut self, id: usize) -> bool
Delete a box 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".