Enum glean_core::upload::UploadResult
source · 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
A recoverable failure.
During upload something went wrong, e.g. the network connection failed. The upload should be retried at a later time.
UnrecoverableFailure
An unrecoverable upload failure.
A possible cause might be a malformed URL.
HttpStatus
A HTTP response code.
This can still indicate an error, depending on the status code.
Done
Signal that this uploader is done with work and won’t accept new work.
Implementations§
source§impl UploadResult
impl UploadResult
sourcepub fn get_label(&self) -> Option<&str>
pub fn get_label(&self) -> Option<&str>
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.
sourcepub fn recoverable_failure() -> Self
pub fn recoverable_failure() -> Self
A recoverable failure.
During upload something went wrong, e.g. the network connection failed. The upload should be retried at a later time.
sourcepub fn unrecoverable_failure() -> Self
pub fn unrecoverable_failure() -> Self
An unrecoverable upload failure.
A possible cause might be a malformed URL.
sourcepub fn http_status(code: i32) -> Self
pub fn http_status(code: i32) -> Self
A HTTP response code.
This can still indicate an error, depending on the status code.
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for UploadResult
impl Send for UploadResult
impl Sync for UploadResult
impl Unpin for UploadResult
impl UnwindSafe for UploadResult
Blanket Implementations§
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<T, UT> HandleAlloc<UT> for T
impl<T, UT> HandleAlloc<UT> for T
§fn new_handle(value: Arc<T>) -> Handle
fn new_handle(value: Arc<T>) -> Handle
§unsafe fn clone_handle(handle: Handle) -> Handle
unsafe fn clone_handle(handle: Handle) -> Handle
§unsafe fn consume_handle(handle: Handle) -> Arc<T>
unsafe fn consume_handle(handle: Handle) -> Arc<T>
Arc<>
Read more