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
type Output
The type returned by the access operation.
Required Methods
Implementors
impl<B: Bits> Access<usize> for Monotone<B> type Output = B;
impl<B: Bits> Access<Range<usize>> for Monotone<B> type Output = Vec<B>;
impl<B: Bits> Access<RangeFrom<usize>> for Monotone<B> type Output = Vec<B>;
impl<B: Bits> Access<RangeTo<usize>> for Monotone<B> type Output = Vec<B>;
impl<B: Bits> Access<RangeFull> for Monotone<B> type Output = Vec<B>;
impl<B: Bits> Access<RangeInclusive<usize>> for Monotone<B> type Output = Vec<B>;
impl<B: Bits> Access<RangeToInclusive<usize>> for Monotone<B> type Output = Vec<B>;
impl<B: Bits> Access<usize> for Uniform<B> type Output = B;
impl<B: Bits> Access<Range<usize>> for Uniform<B> type Output = Vec<B>;
impl<B: Bits> Access<RangeFrom<usize>> for Uniform<B> type Output = Vec<B>;
impl<B: Bits> Access<RangeTo<usize>> for Uniform<B> type Output = Vec<B>;
impl<B: Bits> Access<RangeFull> for Uniform<B> type Output = Vec<B>;
impl<B: Bits> Access<RangeInclusive<usize>> for Uniform<B> type Output = Vec<B>;
impl<B: Bits> Access<RangeToInclusive<usize>> for Uniform<B> type Output = Vec<B>;
impl<B: Bits> Access<usize> for Unimodal<B> type Output = B;
impl<B: Bits> Access<Range<usize>> for Unimodal<B> type Output = Vec<B>;
impl<B: Bits> Access<RangeFrom<usize>> for Unimodal<B> type Output = Vec<B>;
impl<B: Bits> Access<RangeTo<usize>> for Unimodal<B> type Output = Vec<B>;
impl<B: Bits> Access<RangeFull> for Unimodal<B> type Output = Vec<B>;
impl<B: Bits> Access<RangeInclusive<usize>> for Unimodal<B> type Output = Vec<B>;
impl<B: Bits> Access<RangeToInclusive<usize>> for Unimodal<B> type Output = Vec<B>;