pub enum ShardKeyType {
Range,
Hashed,
}Expand description
Shard key type for MongoDB.
Variants§
Range
Range-based sharding (good for range queries).
Hashed
Hash-based sharding (better distribution).
Implementations§
Source§impl ShardKeyType
impl ShardKeyType
Sourcepub fn as_index_value(&self) -> Value
pub fn as_index_value(&self) -> Value
Get the MongoDB index specification value.
Trait Implementations§
Source§impl Clone for ShardKeyType
impl Clone for ShardKeyType
Source§fn clone(&self) -> ShardKeyType
fn clone(&self) -> ShardKeyType
Returns a duplicate of the value. Read more
1.0.0 · 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 ShardKeyType
impl Debug for ShardKeyType
Source§impl<'de> Deserialize<'de> for ShardKeyType
impl<'de> Deserialize<'de> for ShardKeyType
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
Source§impl Hash for ShardKeyType
impl Hash for ShardKeyType
Source§impl PartialEq for ShardKeyType
impl PartialEq for ShardKeyType
Source§impl Serialize for ShardKeyType
impl Serialize for ShardKeyType
impl Copy for ShardKeyType
impl Eq for ShardKeyType
impl StructuralPartialEq for ShardKeyType
Auto Trait Implementations§
impl Freeze for ShardKeyType
impl RefUnwindSafe for ShardKeyType
impl Send for ShardKeyType
impl Sync for ShardKeyType
impl Unpin for ShardKeyType
impl UnwindSafe for ShardKeyType
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