pub trait Get<Index> {
    type Component;
    // Required methods
    fn get_ref(&self, index: Index) -> &Self::Component;
    fn get_mut(&mut self, index: Index) -> &mut Self::Component;
    // Provided methods
    fn get(self, index: Index) -> Self::Component
       where Self: Sized,
             Self::Component: Copy { ... }
    fn set(&mut self, index: Index, component: Self::Component) { ... }
    fn with(self, index: Index, component: Self::Component) -> Self
       where Self: Sized { ... }
}Expand description
Generic access to a structure’s components.
Required Associated Types§
Required Methods§
Provided Methods§
Sourcefn get(self, index: Index) -> Self::Component
 
fn get(self, index: Index) -> Self::Component
Convenience method for getting a copy of a component.