Skip to main content

ById

Trait ById 

Source
pub trait ById {
    type Id;
    type Entry;
    type Error;

    // Required methods
    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>;
}

Required Associated Types§

Required Methods§

Source

fn byid(&self, t: Self::Id) -> Result<&Self::Entry, Self::Error>

Source

fn byid_mut(&mut self, t: Self::Id) -> Result<&mut Self::Entry, Self::Error>

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl ById for GPieces

Source§

impl<I, T> ById for SecondaryMap<I, T>
where I: IdForById + Key,

Source§

type Id = I

Source§

type Entry = T

Source§

type Error = <I as IdForById>::Error

Source§

impl<I, T> ById for DenseSlotMap<I, T>
where I: IdForById + Key,

Source§

type Id = I

Source§

type Entry = T

Source§

type Error = <I as IdForById>::Error