pub struct Table { /* private fields */ }Expand description
Explicit offsets along one axis, with Steps::FILL where a fill goes: a list of offsets, or index values that each give one. start and len choose the offsets in use, so that slicing a table copies none of them.
Implementations§
Source§impl Table
impl Table
Sourcepub fn indices(
values: Arc<dyn IndexSource>,
size: usize,
even: Option<(usize, isize)>,
) -> Table
pub fn indices( values: Arc<dyn IndexSource>, size: usize, even: Option<(usize, isize)>, ) -> Table
A table that reads values as positions along an axis of size positions. A negative value counts back from the end. Every value must lie within the axis, as structure::index_table checks. even gives the first position and the step between positions, where they’re evenly spaced.
Sourcepub fn listed(&self) -> Option<&[usize]>
pub fn listed(&self) -> Option<&[usize]>
The listed offsets in use, or None where the table converts index values as it reads them.
Sourcepub fn chunks(&self, each: impl FnMut(usize, &[usize]))
pub fn chunks(&self, each: impl FnMut(usize, &[usize]))
Calls each with the position of each run of offsets and the run, in order: the listed offsets as one run, or index values converted into runs of up to TABLE_CHUNK offsets.
Sourcepub fn all(&self, f: impl FnMut(Option<usize>) -> bool) -> bool
pub fn all(&self, f: impl FnMut(Option<usize>) -> bool) -> bool
Whether f holds for every offset, None for a fill. It stops at the first offset that fails, and converts no index values after it.
Sourcepub fn slice(&self, start: usize, len: usize) -> Table
pub fn slice(&self, start: usize, len: usize) -> Table
Offsets start..start + len of this table.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Table
impl !UnwindSafe for Table
impl Forget for Table
impl Freeze for Table
impl Send for Table
impl Sync for Table
impl Unpin for Table
impl UnsafeUnpin for Table
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more