pub enum DurabilityTier {
None,
Snapshot,
Dedup,
Stream,
}Expand description
A workload’s declared durability tier — where a second copy of its state lives, and how far behind that copy is allowed to be (R850-P4).
The three non-None variants name turso-backup’s three implemented
tiers. They are spelled here rather than imported because workload-spec
is a leaf crate every fleet node links and turso-backup is a service-side
dependency; the coupling that matters is the vocabulary, not the types.
Variants§
None
Deliberately no second copy. State lives only where the container runs
and is gone when that node is. Legitimate for caches and scratch — and
it is a statement, which is why it is not the same as declaring
nothing (see WorkloadSpec::durability).
Snapshot
turso-backup tier 1a — periodic full VACUUM INTO snapshot to the
object store. Recovery point is the last snapshot, so the loss window is
the snapshot interval, which this declaration does not carry: a
snapshot-tier workload’s RPO is whatever schedules it.
Dedup
turso-backup tier 1b — incremental page-dedup snapshot. Same recovery
point semantics as Self::Snapshot; cheaper per run, so in practice
a shorter interval.
Stream
turso-backup tier 2 — WAL-frame streaming with restore by frame
replay. The only tier with a bounded, declarable loss window; see
Durability::rpo_seconds and
turso_backup::stream::DEFAULT_RPO_TARGET (120 s), which is what an
undeclared RPO means in practice.
Implementations§
Trait Implementations§
Source§impl Clone for DurabilityTier
impl Clone for DurabilityTier
impl Copy for DurabilityTier
Source§impl Debug for DurabilityTier
impl Debug for DurabilityTier
Source§impl<'de> Deserialize<'de> for DurabilityTier
impl<'de> Deserialize<'de> for DurabilityTier
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Display for DurabilityTier
impl Display for DurabilityTier
impl Eq for DurabilityTier
Source§impl PartialEq for DurabilityTier
impl PartialEq for DurabilityTier
Source§impl Serialize for DurabilityTier
impl Serialize for DurabilityTier
impl StructuralPartialEq for DurabilityTier
Source§impl TS for DurabilityTier
impl TS for DurabilityTier
Source§type WithoutGenerics = DurabilityTier
type WithoutGenerics = DurabilityTier
WithoutGenerics should just be Self.
If the type does have generic parameters, then all generic parameters must be replaced with
a dummy type, e.g ts_rs::Dummy or (). The only requirement for these dummy types is that
EXPORT_TO must be None. Read moreSource§type OptionInnerType = DurabilityTier
type OptionInnerType = DurabilityTier
std::option::Option<T>, then this associated type is set to T.
All other implementations of TS should set this type to Self instead.Source§fn docs() -> Option<String>
fn docs() -> Option<String>
TS is derived, docs are
automatically read from your doc comments or #[doc = ".."] attributesSource§fn decl_concrete(cfg: &Config) -> String
fn decl_concrete(cfg: &Config) -> String
TS::decl().
If this type is not generic, then this function is equivalent to TS::decl().Source§fn decl(cfg: &Config) -> String
fn decl(cfg: &Config) -> String
type User = { user_id: number, ... }.
This function will panic if the type has no declaration. Read moreSource§fn inline(cfg: &Config) -> String
fn inline(cfg: &Config) -> String
{ user_id: number }.
This function will panic if the type cannot be inlined.Source§fn inline_flattened(cfg: &Config) -> String
fn inline_flattened(cfg: &Config) -> String
Source§fn visit_generics(v: &mut impl TypeVisitor)where
Self: 'static,
fn visit_generics(v: &mut impl TypeVisitor)where
Self: 'static,
Source§fn output_path() -> Option<PathBuf>
fn output_path() -> Option<PathBuf>
T should be exported, relative to the output directory.
The returned path does not include any base directory. Read moreSource§fn visit_dependencies(v: &mut impl TypeVisitor)where
Self: 'static,
fn visit_dependencies(v: &mut impl TypeVisitor)where
Self: 'static,
Source§fn dependencies(cfg: &Config) -> Vec<Dependency>where
Self: 'static,
fn dependencies(cfg: &Config) -> Vec<Dependency>where
Self: 'static,
Source§fn export(cfg: &Config) -> Result<(), ExportError>where
Self: 'static,
fn export(cfg: &Config) -> Result<(), ExportError>where
Self: 'static,
TS::export_all. Read moreSource§fn export_all(cfg: &Config) -> Result<(), ExportError>where
Self: 'static,
fn export_all(cfg: &Config) -> Result<(), ExportError>where
Self: 'static,
TS::export. Read moreSource§fn export_to_string(cfg: &Config) -> Result<String, ExportError>where
Self: 'static,
fn export_to_string(cfg: &Config) -> Result<String, ExportError>where
Self: 'static,
Auto Trait Implementations§
impl Freeze for DurabilityTier
impl RefUnwindSafe for DurabilityTier
impl Send for DurabilityTier
impl Sync for DurabilityTier
impl Unpin for DurabilityTier
impl UnsafeUnpin for DurabilityTier
impl UnwindSafe for DurabilityTier
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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.