pub enum PartitionKeySpec {
BodyField(JsonPath),
Header(String),
PrincipalAttr(String),
AnyOf(Vec<PartitionKeySpec>),
}Expand description
How to find the partition id in a request.
Not #[non_exhaustive]: the resolver must handle every source kind, so a new
source should force the resolver to be updated rather than silently fail to
resolve.
Variants§
BodyField(JsonPath)
A JSON path into the document body (ingest path).
Header(String)
A request header carries it (e.g. set by an upstream auth gateway).
PrincipalAttr(String)
Derived from a crate::Principal attribute of this name.
AnyOf(Vec<PartitionKeySpec>)
Try each in order until one resolves.
Trait Implementations§
Source§impl Clone for PartitionKeySpec
impl Clone for PartitionKeySpec
Source§fn clone(&self) -> PartitionKeySpec
fn clone(&self) -> PartitionKeySpec
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 PartitionKeySpec
impl Debug for PartitionKeySpec
impl Eq for PartitionKeySpec
Source§impl PartialEq for PartitionKeySpec
impl PartialEq for PartitionKeySpec
Source§fn eq(&self, other: &PartitionKeySpec) -> bool
fn eq(&self, other: &PartitionKeySpec) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for PartitionKeySpec
Auto Trait Implementations§
impl Freeze for PartitionKeySpec
impl RefUnwindSafe for PartitionKeySpec
impl Send for PartitionKeySpec
impl Sync for PartitionKeySpec
impl Unpin for PartitionKeySpec
impl UnsafeUnpin for PartitionKeySpec
impl UnwindSafe for PartitionKeySpec
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