pub enum InjectedValue {
PartitionId,
Constant(Value),
FromPrincipal(String),
FromHeader(String),
}Expand description
How an InjectedField’s value is computed for a document.
Not #[non_exhaustive]: the proxy must resolve every value kind to inject a
concrete value, so a new kind should force the resolver to be updated.
Variants§
PartitionId
The resolved partition id. This is the isolation value: the read path
filters on it, so it must be deterministic (the partition), not
context-derived. Exactly the fields whose value is PartitionId drive
read isolation.
Constant(Value)
A fixed JSON value, the same for every document.
FromPrincipal(String)
A named attribute of the authenticated principal, resolved per request. A decorative value: injected on write and stripped on read, never used as a read filter (its value can differ between the write and the read).
FromHeader(String)
A named request header, resolved per request. Decorative like
InjectedValue::FromPrincipal: injected and stripped, never filtered.
Lets injection be dynamic from request context (e.g. a _region field
taken from an x-region header set by an upstream gateway).
Trait Implementations§
Source§impl Clone for InjectedValue
impl Clone for InjectedValue
Source§fn clone(&self) -> InjectedValue
fn clone(&self) -> InjectedValue
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for InjectedValue
impl Debug for InjectedValue
impl Eq for InjectedValue
Source§impl PartialEq for InjectedValue
impl PartialEq for InjectedValue
Source§fn eq(&self, other: &InjectedValue) -> bool
fn eq(&self, other: &InjectedValue) -> bool
self and other values to be equal, and is used by ==.