pub struct StateKey { /* private fields */ }Expand description
A state key built from its components. See the module docs.
Implementations§
Source§impl StateKey
impl StateKey
Sourcepub fn pipeline(pipeline: impl Into<String>) -> Self
pub fn pipeline(pipeline: impl Into<String>) -> Self
The pipeline-level key namespace of pipeline (no row yet).
Sourcepub fn invocation(pipeline: impl Into<String>, row: impl Into<String>) -> Self
pub fn invocation(pipeline: impl Into<String>, row: impl Into<String>) -> Self
{pipeline}::{row} — a matrix row’s (or topology sink node’s) key.
Sourcepub fn from_rendered(base: impl Into<String>) -> Self
pub fn from_rendered(base: impl Into<String>) -> Self
A key derived from an invocation key render already
produced — the base the per-invocation markers hang off.
Sourcepub fn with_tenant(self, tenant: Option<impl Into<String>>) -> Self
pub fn with_tenant(self, tenant: Option<impl Into<String>>) -> Self
Place the key under tenant ({tenant}::{pipeline}::…, #709).
Sourcepub fn with_parent_key(self, raw: impl Into<String>) -> Self
pub fn with_parent_key(self, raw: impl Into<String>) -> Self
A child invocation’s parent-key value, raw; rendered through
encode_component.
Sourcepub fn with_sub(self, encoded: impl Into<String>) -> Self
pub fn with_sub(self, encoded: impl Into<String>) -> Self
A sub-invocation component already in key form (a product tuple suffix).
Sourcepub fn with_shard(self, shard: impl Into<String>) -> Self
pub fn with_shard(self, shard: impl Into<String>) -> Self
A shard of the invocation ({base}::{shard}).
Sourcepub fn with_suffix(self, suffix: KeySuffix) -> Self
pub fn with_suffix(self, suffix: KeySuffix) -> Self
A marker suffix.
Sourcepub fn pipeline_name(&self) -> Option<&str>
pub fn pipeline_name(&self) -> Option<&str>
The pipeline name, when the key is built from components.
Sourcepub fn namespace(&self) -> String
pub fn namespace(&self) -> String
[{tenant}::]{pipeline} — the first segments of every key of the
pipeline; for a key built from a rendering, that rendering.
Sourcepub fn children_prefix(&self) -> String
pub fn children_prefix(&self) -> String
The prefix every key under this one starts with ({key}::).
Sourcepub fn render_scheme(&self, version: u32) -> String
pub fn render_scheme(&self, version: u32) -> String
The key as scheme version rendered it.
Sourcepub fn legacy_renderings(&self) -> Vec<String>
pub fn legacy_renderings(&self) -> Vec<String>
Every distinct, valid key an earlier scheme rendered for this key, newest
scheme first — where migrate_state_key looks when the current key
holds nothing.
Trait Implementations§
impl Eq for StateKey
impl StructuralPartialEq for StateKey
Auto Trait Implementations§
impl Freeze for StateKey
impl RefUnwindSafe for StateKey
impl Send for StateKey
impl Sync for StateKey
impl Unpin for StateKey
impl UnsafeUnpin for StateKey
impl UnwindSafe for StateKey
Blanket Implementations§
impl<T> Allocation for T
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
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
key and return true if they are equal.Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
Source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request