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