pub enum DurabilityDeclError {
RetiredAnnotation {
key: String,
field: &'static str,
},
MissingStore {
tier: DurabilityTier,
},
StoreWithoutTier,
RpoOnNonStreamTier {
tier: DurabilityTier,
},
MissingEngine {
tier: DurabilityTier,
},
EngineWithoutTier,
MissingSubjects {
tier: DurabilityTier,
},
SubjectsWithoutTier,
EmptySubject,
AbsoluteSubject {
subject: String,
},
TraversingSubject {
subject: String,
},
DuplicateSubject {
subject: String,
},
}Expand description
A durability declaration that cannot be acted on.
Every variant is a refusal to guess. The alternative — falling back to
“undeclared” on a malformed value, the way WorkloadSpec::memory_request_mb
falls back to its ceiling — is safe there and unsafe here: a mistyped memory
request costs a placement, a mistyped durability tier costs the database.
(An unknown tier or engine, or a non-numeric RPO, no longer reaches this
type: those are serde refusals on the typed field.)
Variants§
RetiredAnnotation
R896-F3: the spec still declares durability through the retired
yah.durability.* annotations. Nothing reads them, so passing the spec
would silently mean “no backup”.
MissingStore
A tier that ships bytes with nowhere to ship them.
Fields
tier: DurabilityTierStoreWithoutTier
tier = "none" with a store — contradictory, and the reader cannot
tell which half is the mistake.
RpoOnNonStreamTier
An RPO on a tier that has no bounded loss window to state.
Fields
tier: DurabilityTierMissingEngine
R850-F1: a bytes-shipping tier with no engine. The tier names are turso-backup’s; a spec that means a different engine has to say so.
Fields
tier: DurabilityTierEngineWithoutTier
R850-F1: an engine alongside tier = "none" — nothing ships, so there
is nothing for an engine to be the engine of.
MissingSubjects
R850-F1: a bytes-shipping tier that names no database files.
Fields
tier: DurabilityTierSubjectsWithoutTier
R850-F1: subjects alongside tier = "none".
EmptySubject
R850-F1: a blank entry in the subject list. Skipping it silently would hide a truncated list.
AbsoluteSubject
R850-F1: a subject that is not volume-relative.
TraversingSubject
R850-F1: a subject containing a . or .. component.
DuplicateSubject
R850-F1: the same subject listed twice — it would be backed up twice under one key and restored twice over itself.
Trait Implementations§
Source§impl Clone for DurabilityDeclError
impl Clone for DurabilityDeclError
Source§fn clone(&self) -> DurabilityDeclError
fn clone(&self) -> DurabilityDeclError
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 DurabilityDeclError
impl Debug for DurabilityDeclError
Source§impl Display for DurabilityDeclError
impl Display for DurabilityDeclError
impl Eq for DurabilityDeclError
Source§impl Error for DurabilityDeclError
impl Error for DurabilityDeclError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl PartialEq for DurabilityDeclError
impl PartialEq for DurabilityDeclError
impl StructuralPartialEq for DurabilityDeclError
Auto Trait Implementations§
impl Freeze for DurabilityDeclError
impl RefUnwindSafe for DurabilityDeclError
impl Send for DurabilityDeclError
impl Sync for DurabilityDeclError
impl Unpin for DurabilityDeclError
impl UnsafeUnpin for DurabilityDeclError
impl UnwindSafe for DurabilityDeclError
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
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.