pub enum TransportError {
Connection(ConnectionError),
Stopped(VarInt),
Reset(VarInt),
ClosedStream,
Datagram(SendDatagramError),
}Expand description
A failure of a Transport’s connection or of one of its streams.
moq-net reads the application codes from it: a session close code from
Connection, a stream code from Stopped
and Reset.
Variants§
Connection(ConnectionError)
The connection closed or failed.
Stopped(VarInt)
The peer stopped a stream this side sends on.
Reset(VarInt)
The peer reset a stream this side reads.
ClosedStream
The stream was already finished, reset or stopped.
Datagram(SendDatagramError)
The connection refused a datagram.
Trait Implementations§
Source§impl Clone for TransportError
impl Clone for TransportError
Source§impl Debug for TransportError
impl Debug for TransportError
Source§impl Display for TransportError
impl Display for TransportError
Source§impl Error for TransportError
impl Error for TransportError
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 Error for TransportError
impl Error for TransportError
Source§fn close_kind(&self) -> CloseKind
fn close_kind(&self) -> CloseKind
The typed transport condition, independent of application close codes.
Source§fn session_error(&self) -> Option<(u32, String)>
fn session_error(&self) -> Option<(u32, String)>
Returns the error code and reason if this was an application error. Read more
Source§fn stream_error(&self) -> Option<u32>
fn stream_error(&self) -> Option<u32>
Returns the error code if this was a stream error.
Source§impl From<ClosedStream> for TransportError
impl From<ClosedStream> for TransportError
Source§fn from(_: ClosedStream) -> Self
fn from(_: ClosedStream) -> Self
Converts to this type from the input type.
Source§impl From<ConnectionError> for TransportError
impl From<ConnectionError> for TransportError
Source§fn from(err: ConnectionError) -> Self
fn from(err: ConnectionError) -> Self
Converts to this type from the input type.
Source§impl From<ReadError> for TransportError
impl From<ReadError> for TransportError
Source§impl From<ResetError> for TransportError
impl From<ResetError> for TransportError
Source§fn from(err: ResetError) -> Self
fn from(err: ResetError) -> Self
Converts to this type from the input type.
Source§impl From<SendDatagramError> for TransportError
impl From<SendDatagramError> for TransportError
Source§fn from(err: SendDatagramError) -> Self
fn from(err: SendDatagramError) -> Self
Converts to this type from the input type.
Source§impl From<StoppedError> for TransportError
impl From<StoppedError> for TransportError
Source§fn from(err: StoppedError) -> Self
fn from(err: StoppedError) -> Self
Converts to this type from the input type.
Source§impl From<TransportError> for AnyError
impl From<TransportError> for AnyError
Source§fn from(value: TransportError) -> AnyError
fn from(value: TransportError) -> AnyError
Converts to this type from the input type.
Source§impl From<WriteError> for TransportError
impl From<WriteError> for TransportError
Source§fn from(err: WriteError) -> Self
fn from(err: WriteError) -> Self
Converts to this type from the input type.
Source§impl StackError for TransportError
impl StackError for TransportError
Source§fn as_std(&self) -> &(dyn Error + Send + Sync + 'static)
fn as_std(&self) -> &(dyn Error + Send + Sync + 'static)
Returns this error as a std error reference.
Source§fn into_std(self: Box<Self>) -> Box<dyn Error + Send + Sync>
fn into_std(self: Box<Self>) -> Box<dyn Error + Send + Sync>
Returns this error as a std error.
Source§fn as_dyn(&self) -> &dyn StackError
fn as_dyn(&self) -> &dyn StackError
Returns this error as a
dyn StackError.Source§fn fmt_message(&self, f: &mut Formatter<'_>) -> Result
fn fmt_message(&self, f: &mut Formatter<'_>) -> Result
Returns the next source in the chain, if any.
Source§fn is_transparent(&self) -> bool
fn is_transparent(&self) -> bool
Returns whether this error is transparent and should be skipped in reports.
Auto Trait Implementations§
impl !Freeze for TransportError
impl !RefUnwindSafe for TransportError
impl !UnwindSafe for TransportError
impl Send for TransportError
impl Sync for TransportError
impl Unpin for TransportError
impl UnsafeUnpin for TransportError
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