pub enum StreamError {
Closed,
Reset(Reason),
Disconnected,
Status(GrpcStatus, HeaderValue),
Client(Error<ClientError>),
}Expand description
An error of a SendStream or a RecvStream.
The client side reports the status of the call as
StreamError::Client, the way a unary call reports it.
Variants§
Closed
The stream is closed or cancelled.
Reset(Reason)
The peer reset the stream.
Disconnected
The connection is closed.
Status(GrpcStatus, HeaderValue)
A message could not be sent or received, e.g. it is larger than the
limit. Holds the status and the grpc-message.
Client(Error<ClientError>)
The call failed, client side only.
Implementations§
Source§impl StreamError
impl StreamError
Sourcepub fn status(&self) -> GrpcStatus
pub fn status(&self) -> GrpcStatus
The status of the call this error ends.
Trait Implementations§
Source§impl Clone for StreamError
impl Clone for StreamError
Source§impl Debug for StreamError
impl Debug for StreamError
Source§impl Display for StreamError
impl Display for StreamError
Source§impl Error for StreamError
impl Error for StreamError
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()
Source§impl From<StreamError> for ServerError
impl From<StreamError> for ServerError
Source§fn from(err: StreamError) -> Self
fn from(err: StreamError) -> Self
Converts to this type from the input type.
Source§impl From<StreamError> for Error<ClientError>
Maps an error of the client side of a call.
impl From<StreamError> for Error<ClientError>
Maps an error of the client side of a call.
A StreamError::Status is a request message that cannot be sent.
Source§fn from(err: StreamError) -> Self
fn from(err: StreamError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for StreamError
impl !Send for StreamError
impl !Sync for StreamError
impl !UnwindSafe for StreamError
impl Forget for StreamError
impl Freeze for StreamError
impl Move for StreamError
impl Unpin for StreamError
impl UnsafeUnpin for StreamError
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> FromRequest<T> for T
impl<T> FromRequest<T> for T
Source§impl<T> MethodResult<T> for T
impl<T> MethodResult<T> for T
Source§fn into_response(self) -> Result<Response<T>, ServerError>
fn into_response(self) -> Result<Response<T>, ServerError>
Turn into the reply, or the error the call ends with. Read more