pub struct Chunk<T> { /* private fields */ }Implementations§
Source§impl<T> Chunk<T>
impl<T> Chunk<T>
pub fn new(data: Arc<[T]>) -> Self
Sourcepub fn get(&self, index: usize) -> Option<&T>
pub fn get(&self, index: usize) -> Option<&T>
Returns the element at the given index if the index is out of bounds, it returns None
§Arguments
index- The index of the element
Sourcepub fn get_visibility(&self, index: usize) -> Option<bool>
pub fn get_visibility(&self, index: usize) -> Option<bool>
Returns the visibility of the element at the given index if the index is out of bounds, it returns None
§Arguments
index- The index of the element
Sourcepub fn set_visibility(&mut self, visibility: Vec<bool>)
pub fn set_visibility(&mut self, visibility: Vec<bool>)
Sets the visibility of the elements in the data chunk. Note that the length of the visibility vector should be equal to the length of the data chunk.
Note that this is the only way to change the visibility of the elements in the data chunk, the data chunk does not provide a way to change the visibility of individual elements. This is to ensure that the visibility of the elements is always in sync with the data. If you want to change the visibility of individual elements, you should create a new data chunk.
§Arguments
visibility- A vector of boolean values indicating the visibility of the elements
Sourcepub fn iter(&self) -> DataChunkIteraror<'_, T> ⓘ
pub fn iter(&self) -> DataChunkIteraror<'_, T> ⓘ
Returns an iterator over the visible elements in the data chunk The iterator returns a tuple of the element and its index
§Returns
An iterator over the visible elements in the data chunk
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for Chunk<T>
impl<T> RefUnwindSafe for Chunk<T>where
T: RefUnwindSafe,
impl<T> Send for Chunk<T>
impl<T> Sync for Chunk<T>
impl<T> Unpin for Chunk<T>
impl<T> UnwindSafe for Chunk<T>where
T: RefUnwindSafe,
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
clone_to_uninit)Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::RequestSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§unsafe fn to_subset_unchecked(&self) -> SS
unsafe fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.