Enum vmm_vhost::Error

source ·
pub enum Error {
Show 19 variants BackendInternalError, ClientExit, Disconnect, EnterSuspendedState(Error), FrontendInternalError, IncorrectFds, InvalidCastToInt(TryFromIntError), InvalidMessage, InvalidOperation, InvalidParam(&'static str), OversizedMsg, PartialMessage, RecvBufferTooSmall { got: usize, want: usize, }, ReqHandlerError(Error), RestoreError(Error), SnapshotError(Error), SocketError(Error), SocketRetry(Error), TubeError(TubeError),
}
Expand description

Errors for vhost-user operations

Variants§

§

BackendInternalError

Failure from the backend side.

§

ClientExit

client exited properly.

§

Disconnect

client disconnected. If connection is closed properly, use ClientExit instead.

§

EnterSuspendedState(Error)

§

FrontendInternalError

Failure from the frontend side.

§

IncorrectFds

Fd array in question is too big or too small

§

InvalidCastToInt(TryFromIntError)

Invalid cast to int.

§

InvalidMessage

Invalid message format, flag or content.

§

InvalidOperation

Unsupported operations due to that the protocol feature hasn’t been negotiated.

§

InvalidParam(&'static str)

Invalid parameters.

§

OversizedMsg

Message is too large

§

PartialMessage

Only part of a message have been sent or received successfully

§

RecvBufferTooSmall

Provided recv buffer was too small, and data was dropped.

Fields

§got: usize

The size of the buffer received.

§want: usize

The expected size of the buffer.

§

ReqHandlerError(Error)

Error from request handler

§

RestoreError(Error)

Failure to restore.

§

SnapshotError(Error)

Failure to snapshot.

§

SocketError(Error)

Generic socket errors.

§

SocketRetry(Error)

Should retry the socket operation again.

§

TubeError(TubeError)

Error from tx/rx on a Tube.

Trait Implementations§

source§

impl Debug for Error

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Display for Error

source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Error for Error

source§

fn source(&self) -> Option<&(dyn Error + 'static)>

The lower-level source of this error, if any. Read more
1.0.0 · source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. Read more

Auto Trait Implementations§

§

impl Freeze for Error

§

impl !RefUnwindSafe for Error

§

impl Send for Error

§

impl Sync for Error

§

impl Unpin for Error

§

impl !UnwindSafe for Error

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

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

source§

impl<T> ToString for T
where T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.