pub struct ChunkViewImpl<'a, T>where
T: DenseData,{ /* private fields */ }Expand description
A view over a slice that partitions the slice into chunks corresponding to a valid PQ chunking configuration.
This class maintains the invariant that the provided chunking configuration if valid and that the data being partitioned has the correct length.
Implementations§
Source§impl<'a, T> ChunkViewImpl<'a, T>where
T: DenseData,
impl<'a, T> ChunkViewImpl<'a, T>where
T: DenseData,
Sourcepub fn new<U>(
data: U,
offsets: ChunkOffsetsView<'a>,
) -> Result<Self, ChunkViewError>where
T: From<U>,
pub fn new<U>(
data: U,
offsets: ChunkOffsetsView<'a>,
) -> Result<Self, ChunkViewError>where
T: From<U>,
Construct a new ChunkView.
Returns an error if data.len() != offsets.dim().
pub fn is_empty(&self) -> bool
Trait Implementations§
Source§impl<'a, T> Clone for ChunkViewImpl<'a, T>
impl<'a, T> Clone for ChunkViewImpl<'a, T>
Source§fn clone(&self) -> ChunkViewImpl<'a, T>
fn clone(&self) -> ChunkViewImpl<'a, T>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'a, T> Debug for ChunkViewImpl<'a, T>
impl<'a, T> Debug for ChunkViewImpl<'a, T>
Source§impl<T> Index<usize> for ChunkViewImpl<'_, T>where
T: DenseData,
Return the ith chunk of the view.
impl<T> Index<usize> for ChunkViewImpl<'_, T>where
T: DenseData,
Return the ith chunk of the view.
§Panics
Panics if i >= self.len().
Source§impl<T> IndexMut<usize> for ChunkViewImpl<'_, T>where
T: MutDenseData,
Return the ith chunk of the view.
impl<T> IndexMut<usize> for ChunkViewImpl<'_, T>where
T: MutDenseData,
Return the ith chunk of the view.
§Panics
Panics if i >= self.len().
impl<'a, T> Copy for ChunkViewImpl<'a, T>
Auto Trait Implementations§
impl<'a, T> Freeze for ChunkViewImpl<'a, T>where
T: Freeze,
impl<'a, T> RefUnwindSafe for ChunkViewImpl<'a, T>where
T: RefUnwindSafe,
impl<'a, T> Send for ChunkViewImpl<'a, T>where
T: Send,
impl<'a, T> Sync for ChunkViewImpl<'a, T>where
T: Sync,
impl<'a, T> Unpin for ChunkViewImpl<'a, T>where
T: Unpin,
impl<'a, T> UnwindSafe for ChunkViewImpl<'a, T>where
T: UnwindSafe,
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
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 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>
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