pub struct GenerationManifest<'a> {
pub base_snapshot_key: &'a str,
pub page_size: usize,
pub checkpoint_seq: u32,
pub salt: Option<WalSalt>,
pub first_frame: u64,
pub last_frame: u64,
pub epoch: u64,
pub owner: Option<&'a str>,
pub frame_batches: &'a [(u64, u64)],
}Expand description
In-memory shape of a generation manifest. Format on disk:
TURSO-BACKUP STREAM v4
base_snapshot <key>
page_size <n>
checkpoint_seq <n>
wal_salt <salt1>-<salt2>
first_frame <n>
last_frame <n>
epoch <n>
owner <label> (optional)
frame_batch <first>-<last> (one per batch object, ascending, gap-free)Text, dependency-free (no serde), one field per line. Mirrors the
dedup::Manifest convention so the crate stays consistent.
R732-F2 added epoch/owner and moved the header to v2. R761-F2 added
the frame_batch list and moved it to v3. R858-B19 added wal_salt and
moved it to v4. Older manifests still parse — v1 with epoch = 0,
owner = None; v1/v2 with no batch list, which is what marks their
frames as living one-per-object; v1/v2/v3 with salt = None — so
backups written before any of those changes stay parseable. No older
version is ever written any more.
R858-B19, and this is the one place a legacy manifest is not merely
second-class: a chain of two or more manifests where any of them lacks a
salt is refused by [validate_generation_chain], because a pre-R858-B19
writer could splice two WAL generations into a contiguous-looking chain and
nothing in the manifest records which WAL each range came from. A
single-manifest chain is still restored — one generation cannot be a splice.
Fields§
§base_snapshot_key: &'a str§page_size: usize§checkpoint_seq: u32§salt: Option<WalSalt>R858-B19: the WAL header salt these frames were read under — the field
that actually names the generation, since checkpoint_seq resets to 0
across a writer restart. None only when re-formatting a pre-R858-B19
manifest; tail_frames always has one.
first_frame: u64§last_frame: u64§epoch: u64R732-F2: the fencing epoch this generation was written under. 0 means
it predates fencing (a v1 manifest), which is also the key shape its
frames live under — see BackupTarget::frame_key.
owner: Option<&'a str>R732-F2: opaque owner label, diagnostic only. See StreamConfig::owner.
frame_batches: &'a [(u64, u64)]R761-F2: the (first, last) frame range of each batch object holding
this generation’s frames, ascending and exactly tiling
first_frame..=last_frame. Empty means the pre-batching layout (one
object per frame); a writer emits it empty only when re-formatting a
legacy manifest.
Trait Implementations§
Source§impl<'a> Clone for GenerationManifest<'a>
impl<'a> Clone for GenerationManifest<'a>
Source§fn clone(&self) -> GenerationManifest<'a>
fn clone(&self) -> GenerationManifest<'a>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl<'a> Debug for GenerationManifest<'a>
impl<'a> Debug for GenerationManifest<'a>
impl<'a> Eq for GenerationManifest<'a>
Source§impl<'a> PartialEq for GenerationManifest<'a>
impl<'a> PartialEq for GenerationManifest<'a>
impl<'a> StructuralPartialEq for GenerationManifest<'a>
Auto Trait Implementations§
impl<'a> Freeze for GenerationManifest<'a>
impl<'a> RefUnwindSafe for GenerationManifest<'a>
impl<'a> Send for GenerationManifest<'a>
impl<'a> Sync for GenerationManifest<'a>
impl<'a> Unpin for GenerationManifest<'a>
impl<'a> UnsafeUnpin for GenerationManifest<'a>
impl<'a> UnwindSafe for GenerationManifest<'a>
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<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
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<K, Q> Equivalent<Q> for K
impl<K, Q> Equivalent<Q> for K
Source§fn equivalent(&self, key: &Q) -> bool
fn equivalent(&self, key: &Q) -> bool
key and return true if they are equal.impl<T> ErasedDestructor for Twhere
T: 'static,
impl<T> Fruit for T
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 more