pub struct PartitionedRead<'a, V> { /* private fields */ }Expand description
Read operations for partitioned tables.
Provides read-only access to partitioned data without the ability to modify.
Implementations§
Source§impl<'a, V> PartitionedRead<'a, V>
impl<'a, V> PartitionedRead<'a, V>
Sourcepub fn new(table: &'a PartitionedTable<V>, txn: &'a ReadTransaction) -> Self
pub fn new(table: &'a PartitionedTable<V>, txn: &'a ReadTransaction) -> Self
Creates a new read handle.
Sourcepub fn table(&self) -> &PartitionedTable<V>
pub fn table(&self) -> &PartitionedTable<V>
Gets the table reference.
Sourcepub fn collect_all_segments(
&self,
key: &[u8],
) -> Result<HashMap<u16, Vec<(SegmentInfo, Option<Vec<u8>>)>>>
pub fn collect_all_segments( &self, key: &[u8], ) -> Result<HashMap<u16, Vec<(SegmentInfo, Option<Vec<u8>>)>>>
Collects all segments across all shards for a given base key.
This method iterates through all shards and collects all segments that belong to the specified base key.
§Arguments
key- The key to search for
§Returns
HashMap where key is shard ID and value is vector of (segment_info, segment_data) tuples
Sourcepub fn enumerate_all_segments(
&self,
key: &[u8],
) -> Result<HashMap<u16, Vec<(u16, Vec<u8>)>>>
pub fn enumerate_all_segments( &self, key: &[u8], ) -> Result<HashMap<u16, Vec<(u16, Vec<u8>)>>>
Sourcepub fn read_segment_data(
&self,
segment_info: &SegmentInfo,
) -> Result<Option<(SegmentInfo, Vec<u8>)>>
pub fn read_segment_data( &self, segment_info: &SegmentInfo, ) -> Result<Option<(SegmentInfo, Vec<u8>)>>
Auto Trait Implementations§
impl<'a, V> Freeze for PartitionedRead<'a, V>
impl<'a, V> !RefUnwindSafe for PartitionedRead<'a, V>
impl<'a, V> Send for PartitionedRead<'a, V>where
V: Sync,
impl<'a, V> Sync for PartitionedRead<'a, V>where
V: Sync,
impl<'a, V> Unpin for PartitionedRead<'a, V>
impl<'a, V> !UnwindSafe for PartitionedRead<'a, V>
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