Trait ById
Other items inotter_api_tests
pub trait ById { type Id; type Entry; type Error; fn byid(&self, t: Self::Id) -> Result<&Self::Entry, Self::Error>; fn byid_mut(&mut self, t: Self::Id) -> Result<&mut Self::Entry, Self::Error>; }
type Id
type Entry
type Error
fn byid(&self, t: Self::Id) -> Result<&Self::Entry, Self::Error>
fn byid_mut(&mut self, t: Self::Id) -> Result<&mut Self::Entry, Self::Error>
impl ById for GPieces
type Id = PieceId
type Entry = GPiece
type Error = PieceOpError
pub fn byid(&self, piece: PieceId) -> Result<&GPiece, PieceOpError>
pub fn byid_mut(&mut self, piece: PieceId) -> Result<&mut GPiece, PieceOpError>
impl<I, T> ById for SecondaryMap<I, T> where I: IdForById + Key,
type Id = I
type Entry = T
type Error = <I as IdForById>::Error
pub fn byid( &self, t: <SecondaryMap<I, T> as ById>::Id) -> Result<&T, <SecondaryMap<I, T> as ById>::Error>
pub fn byid_mut( &mut self, t: <SecondaryMap<I, T> as ById>::Id) -> Result<&mut T, <SecondaryMap<I, T> as ById>::Error>
impl<I, T> ById for DenseSlotMap<I, T> where I: IdForById + Key,
pub fn byid( &self, t: <DenseSlotMap<I, T> as ById>::Id) -> Result<&T, <DenseSlotMap<I, T> as ById>::Error>
pub fn byid_mut( &mut self, t: <DenseSlotMap<I, T> as ById>::Id) -> Result<&mut T, <DenseSlotMap<I, T> as ById>::Error>