pub struct DistributeConfig {
pub sharding: Option<String>,
pub shard_key: Option<String>,
pub shard_count: Option<u32>,
pub residency: Option<String>,
pub replication_factor: Option<u8>,
pub consistency: Option<ConsistencyMode>,
pub replication: Option<String>,
}Expand description
Distribution topology from @distribute directive.
Bare @distribute with no args inherits cluster defaults.
Fields§
§sharding: Option<String>Sharding strategy: “hash”, “range”, or custom (default: none)
shard_key: Option<String>Record field hashed/ranged on. Required when
sharding is "hash" or "range"; the loader rejects
schemas that set one without the other.
shard_count: Option<u32>Explicit shard count override. When Some(n),
n >= 2. When absent, the cluster default applies.
residency: Option<String>Residency mode: “sharded”, “full”, “mirrored”, “adaptive” (default: “full”)
replication_factor: Option<u8>Number of replicas: 1-255 (default: cluster default)
consistency: Option<ConsistencyMode>Consistency mode: strong or eventual (default: eventual)
replication: Option<String>Replication control: “false” to disable, “global” for all regions
Trait Implementations§
Source§impl Clone for DistributeConfig
impl Clone for DistributeConfig
Source§fn clone(&self) -> DistributeConfig
fn clone(&self) -> DistributeConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for DistributeConfig
impl RefUnwindSafe for DistributeConfig
impl Send for DistributeConfig
impl Sync for DistributeConfig
impl Unpin for DistributeConfig
impl UnsafeUnpin for DistributeConfig
impl UnwindSafe for DistributeConfig
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