pub struct ColumnReader { /* private fields */ }Expand description
A column store being read: the group and the shard indices handed over so far. The caller owns the requests and the chunks’ bytes.
Implementations§
Source§impl ColumnReader
impl ColumnReader
pub fn new(group: ColumnGroup) -> ColumnReader
pub fn group(&self) -> &ColumnGroup
pub fn has_shard_index(&self, id: &str, shard: u32) -> bool
Sourcepub fn set_shard_index(
&mut self,
id: &str,
shard: u32,
bytes: &[u8],
) -> Result<(), DecodeError>
pub fn set_shard_index( &mut self, id: &str, shard: u32, bytes: &[u8], ) -> Result<(), DecodeError>
Verify one shard’s index and hold it.
Sourcepub fn chunk_range(
&self,
id: &str,
row: u32,
column: u32,
) -> Result<Option<ShardIndexEntry>, DecodeError>
pub fn chunk_range( &self, id: &str, row: u32, column: u32, ) -> Result<Option<ShardIndexEntry>, DecodeError>
chunk_range through the index held for the cell’s shard; an error
until it has been handed over.
Sourcepub fn column(
&self,
id: &str,
row: u32,
column: u32,
payload: &[u8],
) -> Result<Vec<u8>, DecodeError>
pub fn column( &self, id: &str, row: u32, column: u32, payload: &[u8], ) -> Result<Vec<u8>, DecodeError>
decode_column, the payload held as ColumnReader::cells holds it.
Sourcepub fn cells(
&self,
id: &str,
cells: &[(u32, u32)],
payload: &[u8],
) -> Result<Vec<u8>, DecodeError>
pub fn cells( &self, id: &str, cells: &[(u32, u32)], payload: &[u8], ) -> Result<Vec<u8>, DecodeError>
decode_cells, the payload held to what the shard’s index says of
it: empty exactly for a block the shard never held, else the length
the index gives. Without that a failed or cut read would pass for
missing data.
Sourcepub fn column_u16(
&self,
id: &str,
row: u32,
column: u32,
payload: &[u8],
) -> Result<Vec<u16>, DecodeError>
pub fn column_u16( &self, id: &str, row: u32, column: u32, payload: &[u8], ) -> Result<Vec<u16>, DecodeError>
ColumnReader::column of an array of either type, the codes
widened (decode_column_u16).
Sourcepub fn cells_u16(
&self,
id: &str,
cells: &[(u32, u32)],
payload: &[u8],
) -> Result<Vec<u16>, DecodeError>
pub fn cells_u16( &self, id: &str, cells: &[(u32, u32)], payload: &[u8], ) -> Result<Vec<u16>, DecodeError>
ColumnReader::cells of an array of either type, the codes widened
(decode_cells_u16).
Trait Implementations§
Source§impl Clone for ColumnReader
impl Clone for ColumnReader
Auto Trait Implementations§
impl Forget for ColumnReader
impl Freeze for ColumnReaderwhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
PhantomData<u16>: Freeze,
PhantomData<ColumnArray>: Freeze,
*const LeafNode<(String, u32), Vec<Option<ShardIndexEntry>>> is !null: Freeze,
PhantomData<(Owned, LeafOrInternal)>: Freeze,
PhantomData<Box<((String, u32), Vec<Option<ShardIndexEntry>>)>>: Freeze,
impl Move for ColumnReader
impl RefUnwindSafe for ColumnReader
impl Send for ColumnReader
impl Sync for ColumnReader
impl Unpin for ColumnReader
impl UnsafeUnpin for ColumnReaderwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<u16>: UnsafeUnpin,
PhantomData<ColumnArray>: UnsafeUnpin,
*const LeafNode<(String, u32), Vec<Option<ShardIndexEntry>>> is !null: UnsafeUnpin,
PhantomData<(Owned, LeafOrInternal)>: UnsafeUnpin,
PhantomData<Box<((String, u32), Vec<Option<ShardIndexEntry>>)>>: UnsafeUnpin,
impl UnwindSafe for ColumnReader
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