MappedArraySlice
struct · ferroui-base · v0.5.0
struct MappedArraySlice<T>
Provides a mapped view of an underlying slice, selecting arbitrary indices from the source array.
Members
new
fn new(data: &ArraySlice<T>, map: &ArraySlice<i32>) -> Self
Creates a view of the data slice through the map slice.
In a debug build, panics when the map is longer than the data.
length
fn length(self: &Self) -> usize
Gets the number of items in the map.
set
fn set(self: &Self, index: usize, value: T)
Writes the specified element of the slice.
Panics when the index is not less than length.
get
fn get(self: &Self, index: usize) -> T
Reads the specified element of the slice.
Panics when the index is not less than length.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeClassDefaultsBorrow<T>BorrowMut<T>Into<U>From<T>TryInto<U>TryFrom<U>AnyErasedDestructorIntoEither
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.