pub struct PartitionedTable<V> { /* private fields */ }Expand description
Generic partitioned table that stores values in sharded segments.
This type provides the core storage infrastructure without knowing anything about specific value types. It handles the mechanics of:
- Sharding writes across multiple partitions
- Segmenting large values to control write amplification
- Optional meta table for O(1) head segment discovery
The V parameter represents the value handler type that knows how to
encode/decode and manipulate specific value types.
Implementations§
Source§impl<V> PartitionedTable<V>
impl<V> PartitionedTable<V>
Sourcepub fn new(name: &'static str, config: PartitionConfig) -> Self
pub fn new(name: &'static str, config: PartitionConfig) -> Self
Sourcepub fn ensure_table_exists(&self, db: &Database) -> Result<()>
pub fn ensure_table_exists(&self, db: &Database) -> Result<()>
Sourcepub fn config(&self) -> &PartitionConfig
pub fn config(&self) -> &PartitionConfig
Returns the configuration.
Auto Trait Implementations§
impl<V> Freeze for PartitionedTable<V>
impl<V> RefUnwindSafe for PartitionedTable<V>where
V: RefUnwindSafe,
impl<V> Send for PartitionedTable<V>where
V: Send,
impl<V> Sync for PartitionedTable<V>where
V: Sync,
impl<V> Unpin for PartitionedTable<V>where
V: Unpin,
impl<V> UnwindSafe for PartitionedTable<V>where
V: 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