Enum cameleon::StreamError
source · pub enum StreamError {
ReceiveError(Cow<'static, str>),
SendError(Cow<'static, str>),
InvalidPayload(Cow<'static, str>),
Disconnected,
Io(Error),
Timeout,
Poisoned(Cow<'static, str>),
BufferTooSmall,
InStreaming,
}
Expand description
An error type related to payload streaming.
Variants§
ReceiveError(Cow<'static, str>)
Failed to receive payload::Payload
.
SendError(Cow<'static, str>)
Failed to send payload::Payload
.
InvalidPayload(Cow<'static, str>)
Payload leader is invalid.
Disconnected
The device is disconnected from the host.
Io(Error)
IO error.
Timeout
Timeout has occured when receiving stream payload.
Poisoned(Cow<'static, str>)
A panic has occurred in streaming loop.
BufferTooSmall
Buffer is too small to receive data.
InStreaming
Streaming is already started.
Trait Implementations§
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)>
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<Error> for StreamError
impl From<Error> for StreamError
source§impl From<RecvError> for StreamError
impl From<RecvError> for StreamError
source§impl<T> From<SendError<T>> for StreamError
impl<T> From<SendError<T>> for StreamError
source§impl From<StreamError> for CameleonError
impl From<StreamError> for CameleonError
source§fn from(source: StreamError) -> Self
fn from(source: StreamError) -> Self
Converts to this type from the input type.
source§impl From<TryRecvError> for StreamError
impl From<TryRecvError> for StreamError
source§fn from(err: TryRecvError) -> Self
fn from(err: TryRecvError) -> Self
Converts to this type from the input type.
source§impl<T> From<TrySendError<T>> for StreamError
impl<T> From<TrySendError<T>> for StreamError
source§fn from(err: TrySendError<T>) -> Self
fn from(err: TrySendError<T>) -> 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 Unpin for StreamError
impl UnwindSafe 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