pub struct RecoveryRecord {
pub at: DateTime<Utc>,
pub workload: String,
pub node: String,
pub tier: Option<String>,
pub subject: String,
pub bytes: u64,
pub seconds: f64,
pub helper: String,
}Expand description
One subject’s measured restore, appended to .yah/cloud/recovery.jsonl.
bytes and seconds are the helper’s own measured figures, copied
unmodified. at is when the measurement was ingested — the helper emits
no timestamp of its own, so for a line piped straight out of a restore this
is within seconds of the event, and for a replayed old log it is not. Use
RecoveryRecord::from_helper_json_at when the real time is known.
Fields§
§at: DateTime<Utc>§workload: String§node: String§tier: Option<String>The durability tier the restore read from, when the operator said so.
The helper does not print it — it reads TIER from its environment and
emits per-subject source object keys instead — so this is None
unless attributed at ingest.
subject: String§bytes: u64§seconds: f64§helper: StringImplementations§
Source§impl RecoveryRecord
impl RecoveryRecord
Sourcepub fn from_helper_json(
line: &str,
workload: &str,
node: &str,
) -> Result<Vec<Self>>
pub fn from_helper_json( line: &str, workload: &str, node: &str, ) -> Result<Vec<Self>>
Parse one line of turso-backup-hydrate output into one record per
restored subject, stamped with the current time.
A well-formed line reporting no restore (already_populated, a refusal)
yields an empty vec — that is an answer, not an error. Only a line that
is not the helper’s JSON at all is an Err.
Sourcepub fn from_helper_json_at(
line: &str,
workload: &str,
node: &str,
at: DateTime<Utc>,
) -> Result<Vec<Self>>
pub fn from_helper_json_at( line: &str, workload: &str, node: &str, at: DateTime<Utc>, ) -> Result<Vec<Self>>
from_helper_json with the ingest timestamp
supplied — for tests, and for ingesting a log whose real time is known.
Trait Implementations§
Source§impl Clone for RecoveryRecord
impl Clone for RecoveryRecord
Source§fn clone(&self) -> RecoveryRecord
fn clone(&self) -> RecoveryRecord
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 RecoveryRecord
impl Debug for RecoveryRecord
Source§impl<'de> Deserialize<'de> for RecoveryRecord
impl<'de> Deserialize<'de> for RecoveryRecord
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 PartialEq for RecoveryRecord
impl PartialEq for RecoveryRecord
Source§impl Serialize for RecoveryRecord
impl Serialize for RecoveryRecord
impl StructuralPartialEq for RecoveryRecord
Auto Trait Implementations§
impl Freeze for RecoveryRecord
impl RefUnwindSafe for RecoveryRecord
impl Send for RecoveryRecord
impl Sync for RecoveryRecord
impl Unpin for RecoveryRecord
impl UnsafeUnpin for RecoveryRecord
impl UnwindSafe for RecoveryRecord
Blanket Implementations§
impl<T> Allocation for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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<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>. Box<dyn Any> can
then be further downcast into Box<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>. Rc<Any> 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> 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<T> DowncastSync for T
impl<T> DowncastSync for T
impl<T> ErasedDestructor for Twhere
T: 'static,
impl<T> Fruit for T
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
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