#[non_exhaustive]pub enum TransferError {
Show 14 variants
AckError,
Checksum,
FileSize {
sent_size: u64,
file_size: u64,
},
FilesystemSkew,
UnsupportedOffer,
PeerError(String),
ProtocolJson(Error),
ProtocolMsgpack(Error),
Protocol(Box<str>),
ProtocolUnexpectedMessage(Box<str>, Box<str>),
Wormhole(WormholeError),
TransitConnect(TransitConnectError),
Transit(TransitError),
IO(Error),
}
Expand description
An error occurred during file transfer
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.
AckError
Transfer was not acknowledged by peer
Checksum
Receive checksum error
FileSize
The file contained a different amount of bytes than advertized
FilesystemSkew
The file(s) to send got modified during the transfer, and thus corrupted
UnsupportedOffer
Unsupported offer type
PeerError(String)
Something went wrong on the other side
ProtocolJson(Error)
Corrupt JSON message received. Some deserialization went wrong, we probably got some garbage
ProtocolMsgpack(Error)
Corrupt Msgpack message received. Some deserialization went wrong, we probably got some garbage
Protocol(Box<str>)
A generic string message for “something went wrong”, i.e. the server sent some bullshit message order
ProtocolUnexpectedMessage(Box<str>, Box<str>)
Unexpected message (protocol error)
Wormhole(WormholeError)
Wormhole connection error
TransitConnect(TransitConnectError)
Error while establishing transit connection
Transit(TransitError)
Transit error
IO(Error)
I/O error
Trait Implementations§
Source§impl Debug for TransferError
impl Debug for TransferError
Source§impl Display for TransferError
impl Display for TransferError
Source§impl Error for TransferError
impl Error for TransferError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl From<Error> for TransferError
impl From<Error> for TransferError
Source§impl From<Error> for TransferError
impl From<Error> for TransferError
Source§impl From<Error> for TransferError
impl From<Error> for TransferError
Source§impl From<TransitConnectError> for TransferError
impl From<TransitConnectError> for TransferError
Source§fn from(source: TransitConnectError) -> Self
fn from(source: TransitConnectError) -> Self
Converts to this type from the input type.
Source§impl From<TransitError> for TransferError
impl From<TransitError> for TransferError
Source§fn from(source: TransitError) -> Self
fn from(source: TransitError) -> Self
Converts to this type from the input type.
Source§impl From<WormholeError> for TransferError
impl From<WormholeError> for TransferError
Source§fn from(source: WormholeError) -> Self
fn from(source: WormholeError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !Freeze for TransferError
impl !RefUnwindSafe for TransferError
impl Send for TransferError
impl Sync for TransferError
impl Unpin for TransferError
impl !UnwindSafe for TransferError
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
Mutably borrows from an owned value. Read more