pub enum ArtifactState {
Declared,
Building,
Ready,
Disabled,
Stale,
Failed,
RequiresRebuild,
}Expand description
Canonical artifact lifecycle states.
State machine transitions:
Declared ──► Building ──► Ready ──► Stale ──► RequiresRebuild
│ │ │ │
│ ▼ ▼ │
│ Failed Disabled │
│ │ │
└────────────┴──────────────────────────────────┘
(rebuild restarts from Building)Variants§
Declared
Index declared but never materialized.
Building
Artifact is being built or rebuilt.
Ready
Artifact is materialized and queryable.
Disabled
Artifact is explicitly disabled by the operator.
Stale
Underlying data changed; artifact is out of date.
Failed
Build or warmup failed; manual intervention may be needed.
RequiresRebuild
Artifact must be rebuilt before it can serve reads.
Implementations§
Source§impl ArtifactState
impl ArtifactState
Sourcepub fn from_build_state(s: &str, enabled: bool) -> Self
pub fn from_build_state(s: &str, enabled: bool) -> Self
Parse from the legacy string representation stored in physical metadata.
Sourcepub fn as_str(&self) -> &'static str
pub fn as_str(&self) -> &'static str
Canonical string representation for storage and API surfaces.
Sourcepub fn is_queryable(&self) -> bool
pub fn is_queryable(&self) -> bool
Whether this artifact is safe for query reads.
Sourcepub fn can_rebuild(&self) -> bool
pub fn can_rebuild(&self) -> bool
Whether a rebuild operation is valid from this state.
Sourcepub fn needs_attention(&self) -> bool
pub fn needs_attention(&self) -> bool
Whether this state indicates the artifact needs attention.
Trait Implementations§
Source§impl Clone for ArtifactState
impl Clone for ArtifactState
Source§fn clone(&self) -> ArtifactState
fn clone(&self) -> ArtifactState
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 ArtifactState
impl Debug for ArtifactState
Source§impl Display for ArtifactState
impl Display for ArtifactState
Source§impl Hash for ArtifactState
impl Hash for ArtifactState
Source§impl PartialEq for ArtifactState
impl PartialEq for ArtifactState
Source§fn eq(&self, other: &ArtifactState) -> bool
fn eq(&self, other: &ArtifactState) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Copy for ArtifactState
impl Eq for ArtifactState
impl StructuralPartialEq for ArtifactState
Auto Trait Implementations§
impl Freeze for ArtifactState
impl RefUnwindSafe for ArtifactState
impl Send for ArtifactState
impl Sync for ArtifactState
impl Unpin for ArtifactState
impl UnsafeUnpin for ArtifactState
impl UnwindSafe for ArtifactState
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.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>
Converts
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>
Converts
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>
Wrap the input message
T in a tonic::Request