#[repr(u8)]pub enum RoamError<E = Infallible> {
User(E),
UnknownMethod,
InvalidPayload,
Cancelled,
}Expand description
Protocol-level error wrapper distinguishing application errors from roam infrastructure errors.
On the caller side, all return types are wrapped as Result<T, RoamError<E>>:
- Infallible
fn foo() -> TbecomesResult<T, RoamError> - Fallible
fn foo() -> Result<T, E>becomesResult<T, RoamError<E>>
Variants§
User(E)
The handler ran and returned an application error.
UnknownMethod
No handler recognized the method ID.
InvalidPayload
The arguments could not be deserialized.
Cancelled
The call was cancelled before completion.
Trait Implementations§
Auto Trait Implementations§
impl<E> Freeze for RoamError<E>where
E: Freeze,
impl<E> RefUnwindSafe for RoamError<E>where
E: RefUnwindSafe,
impl<E> Send for RoamError<E>where
E: Send,
impl<E> Sync for RoamError<E>where
E: Sync,
impl<E> Unpin for RoamError<E>where
E: Unpin,
impl<E> UnsafeUnpin for RoamError<E>where
E: UnsafeUnpin,
impl<E> UnwindSafe for RoamError<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