Trait zkgroup::common::array_utils::ArrayLike
source · pub trait ArrayLike<T>: Index<usize, Output = T> {
const LEN: usize;
// Required methods
fn create(create_element: impl FnMut() -> T) -> Self;
fn iter(&self) -> Iter<'_, T>;
}
Expand description
Abstracts over fixed-length arrays (and similar types) with an element type T
.
Provides iter
and Index
rather than Deref
or AsRef<[T]>
to allow for alternate forms of
indexing, for which exposing a slice could be confusing. See OneBased
.
Required Associated Constants§
Required Methods§
Object Safety§
This trait is not object safe.