pub enum RiverResult<T, E: ToString> {
Ok(T),
Err {
message: String,
code: E,
},
}Expand description
Result type used by the River protocol.
To serialize this enum, or use it in a message it needs to be
converted to a RiverResultInternal using Into::into.
The reason for why this is needed is given in the documentation
page for the result module.
Variants§
Implementations§
Trait Implementations§
Source§impl<T: Clone, E: Clone + ToString> Clone for RiverResult<T, E>
impl<T: Clone, E: Clone + ToString> Clone for RiverResult<T, E>
Source§fn clone(&self) -> RiverResult<T, E>
fn clone(&self) -> RiverResult<T, E>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<T, E: ToString> From<RiverResult<T, E>> for RiverResultInternal<T>
impl<T, E: ToString> From<RiverResult<T, E>> for RiverResultInternal<T>
Source§fn from(result: RiverResult<T, E>) -> Self
fn from(result: RiverResult<T, E>) -> Self
Converts to this type from the input type.
Source§impl<T, E: TryFrom<String, Error = E2> + ToString, E2: Display> TryFrom<RiverResultInternal<T>> for RiverResult<T, E>
impl<T, E: TryFrom<String, Error = E2> + ToString, E2: Display> TryFrom<RiverResultInternal<T>> for RiverResult<T, E>
Auto Trait Implementations§
impl<T, E> Freeze for RiverResult<T, E>
impl<T, E> RefUnwindSafe for RiverResult<T, E>where
T: RefUnwindSafe,
E: RefUnwindSafe,
impl<T, E> Send for RiverResult<T, E>
impl<T, E> Sync for RiverResult<T, E>
impl<T, E> Unpin for RiverResult<T, E>
impl<T, E> UnwindSafe for RiverResult<T, E>where
T: UnwindSafe,
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