pub enum PartitionKey {
String(String),
Numeric(u64),
Bytes(Vec<u8>),
Hash(u64),
}Expand description
A key used for partitioning data.
Variants§
String(String)
String-based key.
Numeric(u64)
Numeric key (u64).
Bytes(Vec<u8>)
Bytes key.
Hash(u64)
Hash-based key (for consistent hashing).
Trait Implementations§
Source§impl Clone for PartitionKey
impl Clone for PartitionKey
Source§fn clone(&self) -> PartitionKey
fn clone(&self) -> PartitionKey
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 PartitionKey
impl Debug for PartitionKey
Source§impl From<String> for PartitionKey
impl From<String> for PartitionKey
Source§impl From<u64> for PartitionKey
impl From<u64> for PartitionKey
Source§impl Hash for PartitionKey
impl Hash for PartitionKey
Source§impl PartialEq for PartitionKey
impl PartialEq for PartitionKey
impl Eq for PartitionKey
impl StructuralPartialEq for PartitionKey
Auto Trait Implementations§
impl Freeze for PartitionKey
impl RefUnwindSafe for PartitionKey
impl Send for PartitionKey
impl Sync for PartitionKey
impl Unpin for PartitionKey
impl UnwindSafe for PartitionKey
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.