Skip to main content

ReportArgsBuilder

Struct ReportArgsBuilder 

Source
pub struct ReportArgsBuilder<S: State = Empty> { /* private fields */ }
Expand description

Use builder syntax to set the inputs and finish with build().

Implementations§

Source§

impl<S: State> ReportArgsBuilder<S>

Source

pub fn build(self) -> ReportArgs
where S: IsComplete,

Finish building and return the requested object

Source

pub fn bytes_uploaded( self, value: i64, ) -> ReportArgsBuilder<SetBytesUploaded<S>>
where S::BytesUploaded: IsUnset,

Optional (Some / Option setters). Total bytes of backup data uploaded during the run, if known.

Source

pub fn maybe_bytes_uploaded( self, value: Option<i64>, ) -> ReportArgsBuilder<SetBytesUploaded<S>>
where S::BytesUploaded: IsUnset,

Optional (Some / Option setters). Total bytes of backup data uploaded during the run, if known.

Source

pub fn error(self, value: String) -> ReportArgsBuilder<SetError<S>>
where S::Error: IsUnset,

Optional (Some / Option setters). Human-readable error detail, when the run failed.

Source

pub fn maybe_error( self, value: Option<String>, ) -> ReportArgsBuilder<SetError<S>>
where S::Error: IsUnset,

Optional (Some / Option setters). Human-readable error detail, when the run failed.

Source

pub fn outcome(self, value: RunOutcome) -> ReportArgsBuilder<SetOutcome<S>>
where S::Outcome: IsUnset,

Required.

Whether the run succeeded (success) or failed (failure).

Source

pub fn purpose(self, value: BackupPurpose) -> ReportArgsBuilder<SetPurpose<S>>
where S::Purpose: IsUnset,

Required.

Whether the run was a backup or a restore.

Source

pub fn run_id(self, value: Uuid) -> ReportArgsBuilder<SetRunId<S>>
where S::RunId: IsUnset,

Required.

Client-generated UUID identifying this run, minted at run start. Each run must use a fresh UUID: reporting the same run_id twice is rejected with 409.

Source

pub fn s3_received_payload_bytes( self, value: i64, ) -> ReportArgsBuilder<SetS3ReceivedPayloadBytes<S>>
where S::S3ReceivedPayloadBytes: IsUnset,

Optional (Some / Option setters). Bytes of decoded object payload received from S3 during the run.

Source

pub fn maybe_s3_received_payload_bytes( self, value: Option<i64>, ) -> ReportArgsBuilder<SetS3ReceivedPayloadBytes<S>>
where S::S3ReceivedPayloadBytes: IsUnset,

Optional (Some / Option setters). Bytes of decoded object payload received from S3 during the run.

Source

pub fn s3_received_raw_bytes( self, value: i64, ) -> ReportArgsBuilder<SetS3ReceivedRawBytes<S>>
where S::S3ReceivedRawBytes: IsUnset,

Optional (Some / Option setters). Bytes of raw HTTP traffic received from S3 during the run, including protocol overhead.

Source

pub fn maybe_s3_received_raw_bytes( self, value: Option<i64>, ) -> ReportArgsBuilder<SetS3ReceivedRawBytes<S>>
where S::S3ReceivedRawBytes: IsUnset,

Optional (Some / Option setters). Bytes of raw HTTP traffic received from S3 during the run, including protocol overhead.

Source

pub fn s3_sent_payload_bytes( self, value: i64, ) -> ReportArgsBuilder<SetS3SentPayloadBytes<S>>
where S::S3SentPayloadBytes: IsUnset,

Optional (Some / Option setters). Bytes of decoded object payload sent to S3 during the run (excluding protocol and signing overhead).

Source

pub fn maybe_s3_sent_payload_bytes( self, value: Option<i64>, ) -> ReportArgsBuilder<SetS3SentPayloadBytes<S>>
where S::S3SentPayloadBytes: IsUnset,

Optional (Some / Option setters). Bytes of decoded object payload sent to S3 during the run (excluding protocol and signing overhead).

Source

pub fn s3_sent_raw_bytes( self, value: i64, ) -> ReportArgsBuilder<SetS3SentRawBytes<S>>
where S::S3SentRawBytes: IsUnset,

Optional (Some / Option setters). Bytes of raw HTTP traffic sent to S3 during the run, including protocol and signing overhead. Report on both success and failure; omit when traffic was not measured.

Source

pub fn maybe_s3_sent_raw_bytes( self, value: Option<i64>, ) -> ReportArgsBuilder<SetS3SentRawBytes<S>>
where S::S3SentRawBytes: IsUnset,

Optional (Some / Option setters). Bytes of raw HTTP traffic sent to S3 during the run, including protocol and signing overhead. Report on both success and failure; omit when traffic was not measured.

Source

pub fn snapshot_id(self, value: String) -> ReportArgsBuilder<SetSnapshotId<S>>
where S::SnapshotId: IsUnset,

Optional (Some / Option setters). Identifier of the repository snapshot the run produced, for a successful backup.

Source

pub fn maybe_snapshot_id( self, value: Option<String>, ) -> ReportArgsBuilder<SetSnapshotId<S>>
where S::SnapshotId: IsUnset,

Optional (Some / Option setters). Identifier of the repository snapshot the run produced, for a successful backup.

Source

pub fn snapshot_taken_at( self, value: Timestamp, ) -> ReportArgsBuilder<SetSnapshotTakenAt<S>>
where S::SnapshotTakenAt: IsUnset,

Optional (Some / Option setters). When this run froze the data it backed up — the point in time the backup represents, as opposed to when its upload finished. Often a filesystem-level snapshot taken before the transfer, in which case it is not recoverable from the repository and only the device can report it. Recorded once per run: if progress reports already carried it, that value stands.

Source

pub fn maybe_snapshot_taken_at( self, value: Option<Timestamp>, ) -> ReportArgsBuilder<SetSnapshotTakenAt<S>>
where S::SnapshotTakenAt: IsUnset,

Optional (Some / Option setters). When this run froze the data it backed up — the point in time the backup represents, as opposed to when its upload finished. Often a filesystem-level snapshot taken before the transfer, in which case it is not recoverable from the repository and only the device can report it. Recorded once per run: if progress reports already carried it, that value stands.

Source

pub fn type_(self, value: String) -> ReportArgsBuilder<SetType<S>>
where S::Type: IsUnset,

Required.

The backup type that ran (e.g. tamanu-postgres).

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> 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, 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.