pub trait Selectable {
type Position: Copy;
type Index;
// Required methods
fn add(
&mut self,
pos: Self::Position,
from: Option<Self::Index>,
) -> Self::Index;
fn get(&self, pos: Self::Position) -> Option<Self::Index>;
// Provided methods
fn connect(&mut self, _index: Self::Index, _selected: &[Self::Index]) { ... }
fn special(&mut self, _index: Self::Index, _selected: &[Self::Index]) { ... }
}Required Associated Types§
Required Methods§
fn add(&mut self, pos: Self::Position, from: Option<Self::Index>) -> Self::Index
fn get(&self, pos: Self::Position) -> Option<Self::Index>
Provided Methods§
fn connect(&mut self, _index: Self::Index, _selected: &[Self::Index])
fn special(&mut self, _index: Self::Index, _selected: &[Self::Index])
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".