pub enum UploadResult {
    RecoverableFailure { /* private fields */ },
    UnrecoverableFailure { /* private fields */ },
    HttpStatus {
        code: i32,
    },
    Done { /* private fields */ },
}
Expand description

The result of an attempted ping upload.

Variants§

§

RecoverableFailure

Fields

A recoverable failure.

During upload something went wrong, e.g. the network connection failed. The upload should be retried at a later time.

§

UnrecoverableFailure

Fields

An unrecoverable upload failure.

A possible cause might be a malformed URL.

§

HttpStatus

Fields

§code: i32

The HTTP status code

A HTTP response code.

This can still indicate an error, depending on the status code.

§

Done

Fields

Signal that this uploader is done with work and won’t accept new work.

Implementations§

Gets the label to be used in recording error counts for upload.

Returns None if the upload finished succesfully. Failures are recorded in the ping_upload_failure metric.

A recoverable failure.

During upload something went wrong, e.g. the network connection failed. The upload should be retried at a later time.

An unrecoverable upload failure.

A possible cause might be a malformed URL.

A HTTP response code.

This can still indicate an error, depending on the status code.

This uploader is done.

Trait Implementations§

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Create a new handle for an Arc value Read more
Clone a handle Read more
Consume a handle, getting back the initial Arc<>
Get a clone of the Arc<> using a “borrowed” handle. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.