#[repr(u8)]pub enum VoxError<E = Infallible> {
User(E),
UnknownMethod,
InvalidPayload(String),
Cancelled,
ConnectionClosed,
SessionShutdown,
SendFailed,
Indeterminate,
}Expand description
Protocol-level error wrapper distinguishing application errors from vox infrastructure errors.
On the caller side, all return types are wrapped as Result<T, VoxError<E>>:
- Infallible
fn foo() -> TbecomesResult<T, VoxError> - Fallible
fn foo() -> Result<T, E>becomesResult<T, VoxError<E>>
Variants§
User(E)
The handler ran and returned an application error.
UnknownMethod
No handler recognized the method ID.
InvalidPayload(String)
The arguments could not be deserialized.
Cancelled
The call was cancelled before completion (e.g. handler dropped without replying).
ConnectionClosed
The underlying connection closed while the call was in flight.
SessionShutdown
The session shut down while the call was in flight.
SendFailed
The call could not be sent because the transport is dead.
Indeterminate
The runtime refused to guess after recovery.
Trait Implementations§
Auto Trait Implementations§
impl<E> Freeze for VoxError<E>where
E: Freeze,
impl<E> RefUnwindSafe for VoxError<E>where
E: RefUnwindSafe,
impl<E> Send for VoxError<E>where
E: Send,
impl<E> Sync for VoxError<E>where
E: Sync,
impl<E> Unpin for VoxError<E>where
E: Unpin,
impl<E> UnsafeUnpin for VoxError<E>where
E: UnsafeUnpin,
impl<E> UnwindSafe for VoxError<E>where
E: UnwindSafe,
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