pub enum SmartMessagePayload<T: Send> {
Msg(T),
Flush {
on_flush_done: Box<dyn FnOnce() + Send>,
},
Quit(Option<Box<dyn Error + Send>>),
}
Expand description
The payload of a SmartMessage
.
Either data or an end-of-stream marker.
Variants§
Msg(T)
A message sent down the channel.
Flush
When received, flush anything already received and then call the given callback.
Quit(Option<Box<dyn Error + Send>>)
The Sender
has quit.
None
indicates the sender left gracefully, an error indicates otherwise.
Trait Implementations§
source§impl<T: Send> Debug for SmartMessagePayload<T>
impl<T: Send> Debug for SmartMessagePayload<T>
Auto Trait Implementations§
impl<T> Freeze for SmartMessagePayload<T>where
T: Freeze,
impl<T> !RefUnwindSafe for SmartMessagePayload<T>
impl<T> Send for SmartMessagePayload<T>
impl<T> !Sync for SmartMessagePayload<T>
impl<T> Unpin for SmartMessagePayload<T>where
T: Unpin,
impl<T> !UnwindSafe for SmartMessagePayload<T>
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