Trait mayda::utility::Access [] [src]

pub trait Access<Idx> {
    type Output;
    fn access(&self, _: Idx) -> Self::Output;
}

A trait for indexing an encoded vector. Similar to but less convenient than Index. Index::index() returns a reference, but an encoded vector type must give ownership of the returned value to the caller.

Panics

By convention, panics when the index is out of bounds.

The default implementations of access panic to indicate that there is no available specialization for the type. This should not happen unless there is a library bug.

Associated Types

The type returned by the access operation.

Required Methods

The method for the access foo.access(bar) operation.

Implementors