pub enum RpcServerError<C: ConnectionErrors> {
Accept(C::AcceptError),
EarlyClose,
UnexpectedStartMessage,
RecvError(C::RecvError),
SendError(C::SendError),
UnexpectedUpdateMessage,
}
Expand description
Server error. All server DSL methods return a Result
with this error type.
Variants§
Accept(C::AcceptError)
Unable to open a new channel
EarlyClose
Recv side for a channel was closed before getting the first message
UnexpectedStartMessage
Got an unexpected first message, e.g. an update message
RecvError(C::RecvError)
Error receiving a message
SendError(C::SendError)
Error sending a response
UnexpectedUpdateMessage
Got an unexpected update message, e.g. a request message or a non-matching update message
Implementations§
Source§impl<In: RpcMessage, Out: RpcMessage, C: ConnectionErrors> RpcServerError<MappedStreamTypes<In, Out, C>>
impl<In: RpcMessage, Out: RpcMessage, C: ConnectionErrors> RpcServerError<MappedStreamTypes<In, Out, C>>
Sourcepub fn map_back(self) -> RpcServerError<C>
pub fn map_back(self) -> RpcServerError<C>
For a mapped connection, map the error back to the original error type
Source§impl<C: ConnectionErrors> RpcServerError<C>
impl<C: ConnectionErrors> RpcServerError<C>
Sourcepub fn errors_into<T>(self) -> RpcServerError<T>where
T: ConnectionErrors,
C::SendError: Into<T::SendError>,
C::RecvError: Into<T::RecvError>,
C::AcceptError: Into<T::AcceptError>,
pub fn errors_into<T>(self) -> RpcServerError<T>where
T: ConnectionErrors,
C::SendError: Into<T::SendError>,
C::RecvError: Into<T::RecvError>,
C::AcceptError: Into<T::AcceptError>,
Convert into a different error type provided the send, recv and accept errors can be converted
Trait Implementations§
Source§impl<C: ConnectionErrors> Debug for RpcServerError<C>
impl<C: ConnectionErrors> Debug for RpcServerError<C>
Source§impl<C: ConnectionErrors> Display for RpcServerError<C>
impl<C: ConnectionErrors> Display for RpcServerError<C>
Source§impl<C: ConnectionErrors> Error for RpcServerError<C>
impl<C: ConnectionErrors> Error for RpcServerError<C>
1.30.0 · 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()
Auto Trait Implementations§
impl<C> Freeze for RpcServerError<C>where
<C as ConnectionErrors>::AcceptError: Freeze,
<C as ConnectionErrors>::RecvError: Freeze,
<C as ConnectionErrors>::SendError: Freeze,
impl<C> RefUnwindSafe for RpcServerError<C>where
<C as ConnectionErrors>::AcceptError: RefUnwindSafe,
<C as ConnectionErrors>::RecvError: RefUnwindSafe,
<C as ConnectionErrors>::SendError: RefUnwindSafe,
impl<C> Send for RpcServerError<C>
impl<C> Sync for RpcServerError<C>
impl<C> Unpin for RpcServerError<C>
impl<C> UnwindSafe for RpcServerError<C>where
<C as ConnectionErrors>::AcceptError: UnwindSafe,
<C as ConnectionErrors>::RecvError: UnwindSafe,
<C as ConnectionErrors>::SendError: UnwindSafe,
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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