pub struct RangeShardConfig {
pub lower: i64,
pub upper: i64,
pub shard: String,
}Expand description
范围分片配置(显式范围 → shard)
与原 ShardingStrategy::Range(按首字节均分)不同,
本结构允许用户显式指定区间映射。
Fields§
§lower: i64范围下限(含)
upper: i64范围上限(不含)
shard: String该范围对应的 shard
Trait Implementations§
Source§impl Clone for RangeShardConfig
impl Clone for RangeShardConfig
Source§fn clone(&self) -> RangeShardConfig
fn clone(&self) -> RangeShardConfig
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 moreSource§impl Debug for RangeShardConfig
impl Debug for RangeShardConfig
Source§impl<'de> Deserialize<'de> for RangeShardConfig
impl<'de> Deserialize<'de> for RangeShardConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for RangeShardConfig
impl RefUnwindSafe for RangeShardConfig
impl Send for RangeShardConfig
impl Sync for RangeShardConfig
impl Unpin for RangeShardConfig
impl UnsafeUnpin for RangeShardConfig
impl UnwindSafe for RangeShardConfig
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