[][src]Enum uploads_im_client::UploadError

pub enum UploadError {
    BuildingRequest(UploadRequestURLBuildError),
    InvalidFilename(PathBuf),
    SendingRequest(Error),
    ResponseReturnedFailure {
        status_code: StatusCode,
        status_text: String,
    },
    Io(Error),
    ParsingResponse(Error),
}

Represents an error that may occur when building and sending an image upload request.

Variants

Indicates a failure building an upload endpoint URL.

InvalidFilename(PathBuf)

Indicates that the provided filename was invalid.

SendingRequest(Error)

Indicates a upload request transmission error.

ResponseReturnedFailure

Indicates an error response returned by the upload API.

Fields of ResponseReturnedFailure

status_code: StatusCode

The status code returned by the server. Note that this code is contained in the body of the response, and not the header.

status_text: String

A string describing the error returned by the API.

Io(Error)

Indicates an error accessing a file for upload.

ParsingResponse(Error)

Indicates an error parsing the response from the upload API.

Trait Implementations

impl Debug for UploadError[src]

impl Display for UploadError[src]

impl Error for UploadError[src]

impl From<Error> for UploadError[src]

impl From<Error> for UploadError[src]

impl From<Error> for UploadError[src]

impl From<UploadRequestURLBuildError> for UploadError[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.