Trait otter_api_tests::ById [−][src]
pub trait ById { type Id; type Entry; type Error; pub fn byid(&self, t: Self::Id) -> Result<&Self::Entry, Self::Error>; pub fn byid_mut(
&mut self,
t: Self::Id
) -> Result<&mut Self::Entry, Self::Error>; }
Associated Types
Loading content...Required methods
pub fn byid(&self, t: Self::Id) -> Result<&Self::Entry, Self::Error>
[src]
pub fn byid_mut(&mut self, t: Self::Id) -> Result<&mut Self::Entry, Self::Error>
[src]
Implementors
impl ById for GPieces
[src]
type Id = PieceId
type Entry = GPiece
type Error = PieceOpError
pub fn byid(&self, piece: PieceId) -> Result<&GPiece, PieceOpError>
[src]
pub fn byid_mut(&mut self, piece: PieceId) -> Result<&mut GPiece, PieceOpError>
[src]
impl<I, T> ById for SecondaryMap<I, T> where
I: IdForById + Key,
[src]
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>
[src]
&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>
[src]
&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,
[src]
I: IdForById + Key,