Struct timely::container::flatcontainer::impls::slice::ReadSlice

source ·
pub struct ReadSlice<'a, R, O = Vec<<R as Region>::Index>>(/* private fields */)
where
    R: Region,
    O: OffsetContainer<<R as Region>::Index>;
Expand description

A helper to read data out of a slice region.

Implementations§

source§

impl<R, O> ReadSlice<'_, R, O>
where R: Region, O: OffsetContainer<<R as Region>::Index>,

source

pub fn get(&self, index: usize) -> <R as Region>::ReadItem<'_>

Read the n-th item from the underlying region.

§Panics

Panics if the index is out of bounds, i.e., it is larger than the length of this slice representation.

source

pub fn len(&self) -> usize

The number of elements in this slice.

source

pub fn is_empty(&self) -> bool

Returns true if the slice is empty.

source

pub fn iter(&self) -> <ReadSlice<'_, R, O> as IntoIterator>::IntoIter

Returns an iterator over all contained items.

Trait Implementations§

source§

impl<R, O> Clone for ReadSlice<'_, R, O>
where R: Region, O: OffsetContainer<<R as Region>::Index>,

source§

fn clone(&self) -> ReadSlice<'_, R, O>

Returns a copy of the value. Read more
1.0.0 · source§

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

Performs copy-assignment from source. Read more
source§

impl<R, O> Debug for ReadSlice<'_, R, O>
where R: Region, O: OffsetContainer<<R as Region>::Index>, <R as Region>::ReadItem<'a>: for<'a> Debug,

source§

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

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

impl<'a, R, O> IntoIterator for ReadSlice<'a, R, O>
where R: Region, O: OffsetContainer<<R as Region>::Index>,

§

type Item = <R as Region>::ReadItem<'a>

The type of the elements being iterated over.
§

type IntoIter = ReadSliceIter<'a, R, O>

Which kind of iterator are we turning this into?
source§

fn into_iter(self) -> <ReadSlice<'a, R, O> as IntoIterator>::IntoIter

Creates an iterator from a value. Read more
source§

impl<'a, R, O> IntoOwned<'a> for ReadSlice<'a, R, O>
where R: Region, O: OffsetContainer<<R as Region>::Index>,

§

type Owned = Vec<<R as Region>::Owned>

Owned type into which this type can be converted.
source§

fn into_owned(self) -> <ReadSlice<'a, R, O> as IntoOwned<'a>>::Owned

Conversion from an instance of this type to the owned type.
source§

fn clone_onto(self, other: &mut <ReadSlice<'a, R, O> as IntoOwned<'a>>::Owned)

Clones self onto an existing instance of the owned type.
source§

fn borrow_as( owned: &'a <ReadSlice<'a, R, O> as IntoOwned<'a>>::Owned, ) -> ReadSlice<'a, R, O>

Borrows an owned instance as oneself.
source§

impl<R, O> Ord for ReadSlice<'_, R, O>
where R: Region, O: OffsetContainer<<R as Region>::Index>, <R as Region>::ReadItem<'a>: for<'a> Ord,

source§

fn cmp(&self, other: &ReadSlice<'_, R, O>) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
source§

impl<R, O> PartialEq for ReadSlice<'_, R, O>
where R: Region, O: OffsetContainer<<R as Region>::Index>, <R as Region>::ReadItem<'a>: for<'a> PartialEq,

source§

fn eq(&self, other: &ReadSlice<'_, R, O>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<R, O> PartialOrd for ReadSlice<'_, R, O>
where R: Region, O: OffsetContainer<<R as Region>::Index>, <R as Region>::ReadItem<'a>: for<'a> PartialOrd,

source§

fn partial_cmp(&self, other: &ReadSlice<'_, R, O>) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

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

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

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

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

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

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

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

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl<'a, C, O> Push<ReadSlice<'a, C, O>> for SliceRegion<C, O>
where C: Region + Push<<C as Region>::ReadItem<'a>>, O: OffsetContainer<<C as Region>::Index>,

source§

fn push( &mut self, item: ReadSlice<'a, C, O>, ) -> <SliceRegion<C, O> as Region>::Index

Push item into self, returning an index that allows to look up the corresponding read item.
source§

impl<'a, R, O> ReserveItems<ReadSlice<'a, R, O>> for SliceRegion<R, O>
where R: Region + ReserveItems<<R as Region>::ReadItem<'a>> + 'a, O: OffsetContainer<<R as Region>::Index>,

source§

fn reserve_items<I>(&mut self, items: I)
where I: Iterator<Item = ReadSlice<'a, R, O>> + Clone,

Ensure that the region can absorb items without reallocation.
source§

impl<R, O> Copy for ReadSlice<'_, R, O>
where R: Region, O: OffsetContainer<<R as Region>::Index>,

source§

impl<R, O> Eq for ReadSlice<'_, R, O>
where R: Region, O: OffsetContainer<<R as Region>::Index>, <R as Region>::ReadItem<'a>: for<'a> Eq,

Auto Trait Implementations§

§

impl<'a, R, O> Freeze for ReadSlice<'a, R, O>

§

impl<'a, R, O> RefUnwindSafe for ReadSlice<'a, R, O>

§

impl<'a, R, O> Send for ReadSlice<'a, R, O>
where <R as Region>::Owned: Sync, O: Sync, R: Sync,

§

impl<'a, R, O> Sync for ReadSlice<'a, R, O>
where <R as Region>::Owned: Sync, O: Sync, R: Sync,

§

impl<'a, R, O> Unpin for ReadSlice<'a, R, O>

§

impl<'a, R, O> UnwindSafe for ReadSlice<'a, R, O>

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<T> CloneToUninit for T
where T: Clone,

source§

default unsafe fn clone_to_uninit(&self, dst: *mut T)

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

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

source§

unsafe fn clone_to_uninit(&self, dst: *mut T)

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

impl<Q, K> Comparable<K> for Q
where Q: Ord + ?Sized, K: Borrow<Q> + ?Sized,

source§

fn compare(&self, key: &K) -> Ordering

Compare self to key and return their ordering.
source§

impl<T> CopyAs<T> for T

source§

fn copy_as(self) -> T

source§

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

source§

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

Checks if this value is equivalent to the given key. 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, I> MutableAntichainFilter<T> for I
where T: PartialOrder + Ord + Clone, I: IntoIterator<Item = (T, i64)>,

source§

fn filter_through( self, antichain: &mut MutableAntichain<T>, ) -> Drain<'_, [(T, i64); 2]>

Filters time changes through an antichain. Read more
source§

impl<T> ProgressEventTimestamp for T
where T: Data + Debug + Any,

source§

fn as_any(&self) -> &(dyn Any + 'static)

Upcasts this ProgressEventTimestamp to Any. Read more
source§

fn type_name(&self) -> &'static str

Returns the name of the concrete type of this object. Read more
source§

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

§

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<I> ToStream<<I as IntoIterator>::Item> for I
where I: IntoIterator + 'static, <I as IntoIterator>::Item: Data,

source§

fn to_stream<S>( self, scope: &mut S, ) -> StreamCore<S, Vec<<I as IntoIterator>::Item>>
where S: Scope,

Converts to a timely Stream. Read more
source§

impl<C, I> ToStream<C> for I
where C: SizableContainer + Data + PushInto<<I as IntoIterator>::Item>, I: IntoIterator + 'static,

source§

fn to_stream<S>(self, scope: &mut S) -> StreamCore<S, C>
where S: Scope,

Converts to a timely StreamCore. Read more
source§

impl<CB, I> ToStreamBuilder<CB> for I
where CB: ContainerBuilder + PushInto<<I as IntoIterator>::Item>, I: IntoIterator + 'static,

source§

fn to_stream_with_builder<S>( self, scope: &mut S, ) -> StreamCore<S, <CB as ContainerBuilder>::Container>
where S: Scope,

Converts to a timely StreamCore, using the supplied container builder type. Read more
source§

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

§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

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

§

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.
source§

impl<T> Data for T
where T: Clone + 'static,