Skip to main content

Indexable

Trait Indexable 

Source
pub trait Indexable<Idx> {
    type Element: ?Sized;
}
Expand description

place[idx] – Enable indexing into Self.

Indexing is only supported for certain places: namely those handles H, for which Self implements IndexPlace<Idx, H, _, _>.

In a way, this trait is a generic version of PlaceProxy, since indexing allows changing the type based on the type of the index.

Required Associated Types§

Source

type Element: ?Sized

The type of the place expression self[idx].

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§