Skip to main content

ReportArgs

Struct ReportArgs 

Source
#[non_exhaustive]
pub struct ReportArgs { pub bytes_uploaded: Option<i64>, pub error: Option<String>, pub outcome: RunOutcome, pub purpose: BackupPurpose, pub run_id: Uuid, pub s3_received_payload_bytes: Option<i64>, pub s3_received_raw_bytes: Option<i64>, pub s3_sent_payload_bytes: Option<i64>, pub s3_sent_raw_bytes: Option<i64>, pub snapshot_id: Option<String>, pub snapshot_taken_at: Option<Timestamp>, pub type_: String, }
Expand description

Report of a completed backup or restore run.

JSON schema
{
 "description": "Report of a completed backup or restore run.",
 "type": "object",
 "required": [
   "outcome",
   "purpose",
   "run_id",
   "type"
 ],
 "properties": {
   "bytes_uploaded": {
     "description": "Total bytes of backup data uploaded during the run, if known.",
     "type": [
       "integer",
       "null"
     ],
     "format": "int64"
   },
   "error": {
     "description": "Human-readable error detail, when the run failed.",
     "type": [
       "string",
       "null"
     ]
   },
   "outcome": {
     "description": "Whether the run succeeded (`success`) or failed (`failure`).",
     "$ref": "#/components/schemas/RunOutcome"
   },
   "purpose": {
     "description": "Whether the run was a `backup` or a `restore`.",
     "$ref": "#/components/schemas/BackupPurpose"
   },
   "run_id": {
     "description": "Client-generated UUID identifying this run, minted at run start. Each\nrun must use a fresh UUID: reporting the same `run_id` twice is\nrejected with 409.",
     "type": "string",
     "format": "uuid"
   },
   "s3_received_payload_bytes": {
     "description": "Bytes of decoded object payload received from S3 during the run.",
     "type": [
       "integer",
       "null"
     ],
     "format": "int64"
   },
   "s3_received_raw_bytes": {
     "description": "Bytes of raw HTTP traffic received from S3 during the run, including\nprotocol overhead.",
     "type": [
       "integer",
       "null"
     ],
     "format": "int64"
   },
   "s3_sent_payload_bytes": {
     "description": "Bytes of decoded object payload sent to S3 during the run (excluding\nprotocol and signing overhead).",
     "type": [
       "integer",
       "null"
     ],
     "format": "int64"
   },
   "s3_sent_raw_bytes": {
     "description": "Bytes of raw HTTP traffic sent to S3 during the run, including protocol\nand signing overhead. Report on both success and failure; omit when\ntraffic was not measured.",
     "type": [
       "integer",
       "null"
     ],
     "format": "int64"
   },
   "snapshot_id": {
     "description": "Identifier of the repository snapshot the run produced, for a\nsuccessful backup.",
     "type": [
       "string",
       "null"
     ]
   },
   "snapshot_taken_at": {
     "description": "When this run froze the data it backed up — the point in time the backup\nrepresents, as opposed to when its upload finished. Often a filesystem-level\nsnapshot taken before the transfer, in which case it is not recoverable\nfrom the repository and only the device can report it. Recorded once per\nrun: if progress reports already carried it, that value stands.",
     "oneOf": [
       {
         "type": "null"
       },
       {
         "$ref": "#/definitions/CanopyTimestamp"
       }
     ]
   },
   "type": {
     "description": "The backup type that ran (e.g. `tamanu-postgres`).",
     "type": "string"
   }
 }
}

Fields (Non-exhaustive)§

This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
§bytes_uploaded: Option<i64>

Total bytes of backup data uploaded during the run, if known.

§error: Option<String>

Human-readable error detail, when the run failed.

§outcome: RunOutcome

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

§purpose: BackupPurpose

Whether the run was a backup or a restore.

§run_id: Uuid

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.

§s3_received_payload_bytes: Option<i64>

Bytes of decoded object payload received from S3 during the run.

§s3_received_raw_bytes: Option<i64>

Bytes of raw HTTP traffic received from S3 during the run, including protocol overhead.

§s3_sent_payload_bytes: Option<i64>

Bytes of decoded object payload sent to S3 during the run (excluding protocol and signing overhead).

§s3_sent_raw_bytes: Option<i64>

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.

§snapshot_id: Option<String>

Identifier of the repository snapshot the run produced, for a successful backup.

§snapshot_taken_at: Option<Timestamp>

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.

§type_: String

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

Implementations§

Source§

impl ReportArgs

Source

pub fn builder() -> ReportArgsBuilder

Create an instance of ReportArgs using the builder syntax

Trait Implementations§

Source§

impl Clone for ReportArgs

Source§

fn clone(&self) -> ReportArgs

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ReportArgs

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for ReportArgs

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for ReportArgs

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.