pub struct ReadPlan { /* private fields */ }Implementations§
Source§impl ReadPlan
impl ReadPlan
pub fn input(source: usize, items: usize) -> Self
pub fn fill(items: usize) -> Self
pub fn index(base: i64, step: i64, items: usize) -> Self
pub fn copy( source: usize, source_items: usize, map: Mapping, items: usize, missing: Missing, ) -> Self
Sourcepub fn joined(
rows: usize,
parts: impl IntoIterator<Item = Self>,
) -> Result<Self, Error>
pub fn joined( rows: usize, parts: impl IntoIterator<Item = Self>, ) -> Result<Self, Error>
The read of parts side by side in rows rows, as a catenate reads its arguments: each row holds each part’s next stretch of its items in turn, an equal share of the part’s items.
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn route(&self) -> &ReadRoute
Sourcepub fn at(&self, item: usize) -> Run
pub fn at(&self, item: usize) -> Run
What item item reads, as a one-item run (runs), or Run::Invalid past the end.
Sourcepub fn runs(&self, range: Range<usize>, sink: &mut dyn RunSink) -> bool
pub fn runs(&self, range: Range<usize>, sink: &mut dyn RunSink) -> bool
Gives sink the runs of items range, in order, until it stops, and whether it took every run. A source gives a run of its items, an index plan a run of values, a default fills, and a join each part’s stretch of each row. A map gives the runs of its positions (Mapping::spans), each read through its input, and its misses through its plan of misses, unless the sink walks it whole (RunSink::walk). Only a strided run through a map reads one position at a time.
pub fn mapped( input: ReadPlan, map: Mapping, missing: ReadPlan, items: usize, ) -> Self
pub fn remapped(&self, map: Mapping, items: usize, missing: Missing) -> Self
Sourcepub fn try_for_each_source<E>(
&self,
visit: &mut impl FnMut(usize, usize) -> Result<(), E>,
) -> Result<(), E>
pub fn try_for_each_source<E>( &self, visit: &mut impl FnMut(usize, usize) -> Result<(), E>, ) -> Result<(), E>
Calls visit with each source that this read reaches and its item count. A plan’s routes form a tree, so each place that reads a source visits it once.
Sourcepub fn as_codes(&self, character: bool) -> Cow<'_, Self>
pub fn as_codes(&self, character: bool) -> Cow<'_, Self>
Preserve a logical character read’s space default while its bindings become integer codepoints.
pub fn contiguous(&self, range: Range<usize>) -> Option<(usize, Range<usize>)>
pub fn shape_hint(&self) -> Vec<usize>
Sourcepub fn positional(&self, shape: &[usize]) -> Option<(usize, Mapping)>
pub fn positional(&self, shape: &[usize]) -> Option<(usize, Mapping)>
The one source that a read over a result of shape reaches by an affine map, and that map, where every position stays within the source. None for a read that joins sources, fills, or maps otherwise.
Trait Implementations§
impl Eq for ReadPlan
impl StructuralPartialEq for ReadPlan
Auto Trait Implementations§
impl !RefUnwindSafe for ReadPlan
impl !UnwindSafe for ReadPlan
impl Forget for ReadPlan
impl Freeze for ReadPlan
impl Send for ReadPlan
impl Sync for ReadPlan
impl Unpin for ReadPlan
impl UnsafeUnpin for ReadPlan
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