#[non_exhaustive]
pub enum SftpErrorKind {
    NoSuchFile,
    PermDenied,
    Failure,
    BadMessage,
    OpUnsupported,
    Unknown,
}

Variants (Non-exhaustive)

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.

NoSuchFile

is returned when a reference is made to a file which should exist but doesn’t.

PermDenied

Returned when the authenticated user does not have sufficient permissions to perform the operation.

Failure

A generic catch-all error message.

It should be returned if an error occurs for which there is no more specific error code defined.

BadMessage

May be returned if a badly formatted packet or protocol incompatibility is detected.

If the handle is opened read only, but write flag is required, then BadMessage might be returned, vice versa.

OpUnsupported

Indicates that an attempt was made to perform an operation which is not supported for the server.

Unknown

Unknown error code

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
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.

Calls U::from(self).

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

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
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.