[−][src]Struct glommio::channels::local_channel::ChannelError
This is the error that is returned from channel operations if something goes wrong.
It encapsulates an ErrorKind
, which will be different for each kind of error and
also makes the item sent through the channel available through the public attribute item
.
You can convert between this and io::Error
(losing information on item
) so the
? constructs around io::Error
should all work. Another possible way of doing this
is returning an io::Error
and encapsulating item
on its inner field. However that
adds Send
and Sync
requirements plus an allocation to the inner field (or to a
helper struct around the inner field) that we'd like to avoid.
Fields
item: T
The ChannelError
encapsulates the item we originally tried to send into the channel
in case you need to do something with it upon failure.
Trait Implementations
impl<T: Debug> Debug for ChannelError<T>
[src]
impl<T: Debug> From<ChannelError<T>> for Error
[src]
fn from(error: ChannelError<T>) -> Self
[src]
Auto Trait Implementations
impl<T> RefUnwindSafe for ChannelError<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<T> Send for ChannelError<T> where
T: Send,
T: Send,
impl<T> Sync for ChannelError<T> where
T: Sync,
T: Sync,
impl<T> Unpin for ChannelError<T> where
T: Unpin,
T: Unpin,
impl<T> UnwindSafe for ChannelError<T> where
T: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
[src]
type Output = T
Should always be Self
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,