Skip to main content

DurabilityDeclError

Enum DurabilityDeclError 

Source
pub enum DurabilityDeclError {
Show 16 variants UnknownTier { value: String, }, OrphanKey { key: &'static str, }, MissingStore { tier: DurabilityTier, }, StoreWithoutTier, RpoOnNonStreamTier { tier: DurabilityTier, }, UnparseableRpo { value: String, }, UnparseableStateMb { value: String, }, UnknownEngine { value: String, }, MissingEngine { tier: DurabilityTier, }, EngineWithoutTier, MissingSubjects { tier: DurabilityTier, }, SubjectsWithoutTier, EmptySubject, AbsoluteSubject { subject: String, }, TraversingSubject { subject: String, }, DuplicateSubject { subject: String, },
}
Expand description

A yah.durability.* declaration that cannot be read as one.

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.

Variants§

§

UnknownTier

yah.durability.tier holds something outside the vocabulary.

Fields

§value: String
§

OrphanKey

A store/rpo-seconds key with no tier key beside it — most often tier spelled wrong.

Fields

§key: &'static str
§

MissingStore

A tier that ships bytes with nowhere to ship them.

Fields

§

StoreWithoutTier

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

§

UnparseableRpo

rpo-seconds is not a number of seconds.

Fields

§value: String
§

UnparseableStateMb

state-mb is not a number of mebibytes.

Fields

§value: String
§

UnknownEngine

R850-F1: yah.durability.engine holds something with no restore path.

Fields

§value: String
§

MissingEngine

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

§

EngineWithoutTier

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

§

SubjectsWithoutTier

R850-F1: subjects alongside tier = "none".

§

EmptySubject

R850-F1: an empty entry in the comma-separated subject list — a stray or trailing comma. Skipping it silently would hide a truncated list.

§

AbsoluteSubject

R850-F1: a subject that is not volume-relative.

Fields

§subject: String
§

TraversingSubject

R850-F1: a subject containing a . or .. component.

Fields

§subject: String
§

DuplicateSubject

R850-F1: the same subject listed twice — it would be backed up twice under one key and restored twice over itself.

Fields

§subject: String

Trait Implementations§

Source§

impl Clone for DurabilityDeclError

Source§

fn clone(&self) -> DurabilityDeclError

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for DurabilityDeclError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for DurabilityDeclError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for DurabilityDeclError

Source§

impl Error for DurabilityDeclError

1.30.0 · Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0:

use the Display impl or to_string()

1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl PartialEq for DurabilityDeclError

Source§

fn eq(&self, other: &DurabilityDeclError) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for DurabilityDeclError

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.