pub trait ArrayIndex<O: Object> {
type Output;
// Required methods
fn get(self, array: Array<O>) -> Option<Self::Output>;
unsafe fn get_unchecked(self, array: Array<O>) -> Self::Output;
}
Expand description
A type that can be used to index into an Array
.
Required Associated Types§
Required Methods§
Sourcefn get(self, array: Array<O>) -> Option<Self::Output>
fn get(self, array: Array<O>) -> Option<Self::Output>
Returns the output at self
, or None
if self
is out-of-bounds.
Sourceunsafe fn get_unchecked(self, array: Array<O>) -> Self::Output
unsafe fn get_unchecked(self, array: Array<O>) -> Self::Output
Returns the output at self
without safety checks.