pub struct PartitionKey(/* private fields */);Expand description
An opaque canonical logical partition key.
Implementations§
Source§impl PartitionKey
impl PartitionKey
Sourcepub fn new(bytes: Vec<u8>) -> Result<Self, KeyBytesError>
pub fn new(bytes: Vec<u8>) -> Result<Self, KeyBytesError>
Validates a key’s purpose/version envelope and hard size bounds.
Component-level validation requires the exact compiler-produced schema.
Sourcepub fn from_bytes(bytes: Vec<u8>) -> Result<Self, KeyBytesError>
pub fn from_bytes(bytes: Vec<u8>) -> Result<Self, KeyBytesError>
Validates a key’s purpose/version envelope and hard size bounds.
Sourcepub fn aggregate_type_id(&self) -> AggregateTypeId
pub fn aggregate_type_id(&self) -> AggregateTypeId
Returns the stable type identity encoded in the key envelope.
Sourcepub fn into_bytes(self) -> Vec<u8> ⓘ
pub fn into_bytes(self) -> Vec<u8> ⓘ
Returns the canonical key bytes.
Trait Implementations§
Source§impl Clone for PartitionKey
impl Clone for PartitionKey
Source§impl Debug for PartitionKey
impl Debug for PartitionKey
impl Eq for PartitionKey
Source§impl Hash for PartitionKey
impl Hash for PartitionKey
Source§impl Ord for PartitionKey
impl Ord for PartitionKey
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for PartitionKey
impl PartialEq for PartitionKey
Source§impl PartialOrd for PartitionKey
impl PartialOrd 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 UnsafeUnpin 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