pub trait TabletLocator: Send + Sync {
// Required methods
fn tablets_for_table(&self, table: &str) -> DistributedResult<Vec<TabletId>>;
fn partitioning(&self, table: &str) -> DistributedResult<PartitionSpec>;
}Expand description
Resolves which tablets serve one table. Defined here (not in
mongreldb-cluster) so the query crate stays free of the cluster
dependency; the cluster wave binds TabletLayout/routing metadata onto
this trait.
Required Methods§
Sourcefn tablets_for_table(&self, table: &str) -> DistributedResult<Vec<TabletId>>
fn tablets_for_table(&self, table: &str) -> DistributedResult<Vec<TabletId>>
The tablets serving table, in deterministic layout order.
Sourcefn partitioning(&self, table: &str) -> DistributedResult<PartitionSpec>
fn partitioning(&self, table: &str) -> DistributedResult<PartitionSpec>
How table is partitioned across those tablets.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".