Skip to main content

ReadPlan

Struct ReadPlan 

Source
pub struct ReadPlan { /* private fields */ }

Implementations§

Source§

impl ReadPlan

Source

pub fn input(source: usize, items: usize) -> Self

Source

pub fn fill(items: usize) -> Self

Source

pub fn index(base: i64, step: i64, items: usize) -> Self

Source

pub fn copy( source: usize, source_items: usize, map: Mapping, items: usize, missing: Missing, ) -> Self

Source

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.

Source

pub fn len(&self) -> usize

Source

pub fn is_empty(&self) -> bool

Source

pub fn route(&self) -> &ReadRoute

Source

pub fn at(&self, item: usize) -> Run

What item item reads, as a one-item run (runs), or Run::Invalid past the end.

Source

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.

Source

pub fn remapped(&self, map: Mapping, items: usize, missing: Missing) -> Self

Source

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.

Source

pub fn as_codes(&self, character: bool) -> Cow<'_, Self>

Preserve a logical character read’s space default while its bindings become integer codepoints.

Source

pub fn contiguous(&self, range: Range<usize>) -> Option<(usize, Range<usize>)>

Source

pub fn shape_hint(&self) -> Vec<usize>

Source

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.

Source

pub fn inverse( &self, source: usize, shape: &[usize], items: usize, ) -> Option<Mapping>

The inverse read where this plan visits every item of one source once by affine axes.

Trait Implementations§

Source§

impl Clone for ReadPlan

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ReadPlan

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for ReadPlan

Source§

impl PartialEq for ReadPlan

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for ReadPlan

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts 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
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.