pub enum Error<C: Connector, E: Debug> {
Open(C::OpenError),
Send(C::SendError),
Recv(C::RecvError),
EarlyClose,
Downcast,
Application(E),
}
Expand description
Server error when accepting a server streaming request
This combines network errors with application errors. Usually you don’t care about the exact nature of the error, but if you want to handle application errors differently, you can match on this enum.
Variants§
Open(C::OpenError)
Unable to open a substream at all
Send(C::SendError)
Unable to send the request to the server
Recv(C::RecvError)
Error received when creating the stream
EarlyClose
Connection was closed before receiving the first message
Downcast
Unexpected response from the server
Application(E)
Application error
Trait Implementations§
Source§impl<S: Connector, E: Debug> Error for Error<S, E>
impl<S: Connector, E: Debug> Error for Error<S, E>
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, E> Freeze for Error<C, E>where
<C as ConnectionErrors>::OpenError: Freeze,
<C as ConnectionErrors>::SendError: Freeze,
<C as ConnectionErrors>::RecvError: Freeze,
E: Freeze,
impl<C, E> RefUnwindSafe for Error<C, E>where
<C as ConnectionErrors>::OpenError: RefUnwindSafe,
<C as ConnectionErrors>::SendError: RefUnwindSafe,
<C as ConnectionErrors>::RecvError: RefUnwindSafe,
E: RefUnwindSafe,
impl<C, E> Send for Error<C, E>where
E: Send,
impl<C, E> Sync for Error<C, E>where
E: Sync,
impl<C, E> Unpin for Error<C, E>where
E: Unpin,
impl<C, E> UnwindSafe for Error<C, E>where
<C as ConnectionErrors>::OpenError: UnwindSafe,
<C as ConnectionErrors>::SendError: UnwindSafe,
<C as ConnectionErrors>::RecvError: UnwindSafe,
E: 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