Skip to main content

ProgressArgsBuilder

Struct ProgressArgsBuilder 

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

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

Implementations§

Source§

impl<S: State> ProgressArgsBuilder<S>

Source

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

Finish building and return the requested object

Source

pub fn bytes_cached(self, value: i64) -> ProgressArgsBuilder<SetBytesCached<S>>
where S::BytesCached: IsUnset,

Optional (Some / Option setters). Bytes found already present in the repository, and so not re-uploaded.

Source

pub fn maybe_bytes_cached( self, value: Option<i64>, ) -> ProgressArgsBuilder<SetBytesCached<S>>
where S::BytesCached: IsUnset,

Optional (Some / Option setters). Bytes found already present in the repository, and so not re-uploaded.

Source

pub fn bytes_estimated( self, value: i64, ) -> ProgressArgsBuilder<SetBytesEstimated<S>>
where S::BytesEstimated: IsUnset,

Optional (Some / Option setters). Total bytes this run currently expects to handle. May be revised upward.

Source

pub fn maybe_bytes_estimated( self, value: Option<i64>, ) -> ProgressArgsBuilder<SetBytesEstimated<S>>
where S::BytesEstimated: IsUnset,

Optional (Some / Option setters). Total bytes this run currently expects to handle. May be revised upward.

Source

pub fn bytes_hashed(self, value: i64) -> ProgressArgsBuilder<SetBytesHashed<S>>
where S::BytesHashed: IsUnset,

Optional (Some / Option setters). Bytes processed (hashed, compressed) so far.

Source

pub fn maybe_bytes_hashed( self, value: Option<i64>, ) -> ProgressArgsBuilder<SetBytesHashed<S>>
where S::BytesHashed: IsUnset,

Optional (Some / Option setters). Bytes processed (hashed, compressed) so far.

Source

pub fn bytes_read(self, value: i64) -> ProgressArgsBuilder<SetBytesRead<S>>
where S::BytesRead: IsUnset,

Optional (Some / Option setters). Source bytes read so far.

Source

pub fn maybe_bytes_read( self, value: Option<i64>, ) -> ProgressArgsBuilder<SetBytesRead<S>>
where S::BytesRead: IsUnset,

Optional (Some / Option setters). Source bytes read so far.

Source

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

Optional (Some / Option setters). Bytes uploaded to the repository so far.

Source

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

Optional (Some / Option setters). Bytes uploaded to the repository so far.

Source

pub fn current_path( self, value: String, ) -> ProgressArgsBuilder<SetCurrentPath<S>>
where S::CurrentPath: IsUnset,

Optional (Some / Option setters). What the run is working on right now, for display.

Source

pub fn maybe_current_path( self, value: Option<String>, ) -> ProgressArgsBuilder<SetCurrentPath<S>>
where S::CurrentPath: IsUnset,

Optional (Some / Option setters). What the run is working on right now, for display.

Source

pub fn errors(self, value: i64) -> ProgressArgsBuilder<SetErrors<S>>
where S::Errors: IsUnset,

Optional (Some / Option setters). Errors hit so far.

Source

pub fn maybe_errors( self, value: Option<i64>, ) -> ProgressArgsBuilder<SetErrors<S>>
where S::Errors: IsUnset,

Optional (Some / Option setters). Errors hit so far.

Source

pub fn extra( self, value: Map<String, Value>, ) -> ProgressArgsBuilder<SetExtra<S>>
where S::Extra: IsUnset,

Required.

Any further detail the backup engine emits. Canopy makes no commitment about its shape: it is stored and shown verbatim, never interpreted.

Source

pub fn files_done(self, value: i64) -> ProgressArgsBuilder<SetFilesDone<S>>
where S::FilesDone: IsUnset,

Optional (Some / Option setters). Files finished so far.

Source

pub fn maybe_files_done( self, value: Option<i64>, ) -> ProgressArgsBuilder<SetFilesDone<S>>
where S::FilesDone: IsUnset,

Optional (Some / Option setters). Files finished so far.

Source

pub fn files_estimated( self, value: i64, ) -> ProgressArgsBuilder<SetFilesEstimated<S>>
where S::FilesEstimated: IsUnset,

Optional (Some / Option setters). Total files this run currently expects to handle.

Source

pub fn maybe_files_estimated( self, value: Option<i64>, ) -> ProgressArgsBuilder<SetFilesEstimated<S>>
where S::FilesEstimated: IsUnset,

Optional (Some / Option setters). Total files this run currently expects to handle.

Source

pub fn ignored_errors( self, value: i64, ) -> ProgressArgsBuilder<SetIgnoredErrors<S>>
where S::IgnoredErrors: IsUnset,

Optional (Some / Option setters). Errors hit and deliberately ignored so far.

Source

pub fn maybe_ignored_errors( self, value: Option<i64>, ) -> ProgressArgsBuilder<SetIgnoredErrors<S>>
where S::IgnoredErrors: IsUnset,

Optional (Some / Option setters). Errors hit and deliberately ignored so far.

Source

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

Optional (Some / Option setters). Whether this is a backup or a restore run.

Source

pub fn maybe_purpose( self, value: Option<BackupPurpose>, ) -> ProgressArgsBuilder<SetPurpose<S>>
where S::Purpose: IsUnset,

Optional (Some / Option setters). Whether this is a backup or a restore run.

Source

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

Required.

The run-uuid the client minted for this run — the same one it passes to POST /backup-credentials and reports under at POST /backup-report.

Source

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

Optional (Some / Option setters). Bytes of decoded object payload received from S3 so far.

Source

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

Optional (Some / Option setters). Bytes of decoded object payload received from S3 so far.

Source

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

Optional (Some / Option setters). Bytes of raw HTTP traffic received from S3 so far.

Source

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

Optional (Some / Option setters). Bytes of raw HTTP traffic received from S3 so far.

Source

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

Optional (Some / Option setters). Bytes of decoded object payload sent to S3 so far.

Source

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

Optional (Some / Option setters). Bytes of decoded object payload sent to S3 so far.

Source

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

Optional (Some / Option setters). Bytes of raw HTTP traffic sent to S3 so far, including protocol and signing overhead.

Source

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

Optional (Some / Option setters). Bytes of raw HTTP traffic sent to S3 so far, including protocol and signing overhead.

Source

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

Optional (Some / Option setters). When this run froze the data it is backing up — the point in time the backup represents, as opposed to when its upload finishes. Send it as soon as it is known (before any transfer starts). Recorded once per run: the first value Canopy sees stands, whether it arrives here or on the report.

Source

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

Optional (Some / Option setters). When this run froze the data it is backing up — the point in time the backup represents, as opposed to when its upload finishes. Send it as soon as it is known (before any transfer starts). Recorded once per run: the first value Canopy sees stands, whether it arrives here or on the report.

Source

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

Required.

The backup type being run (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.