#[non_exhaustive]pub enum Decoded<E, Err> {
Nothing,
Event(E),
Events(Vec<E>),
Error(Err),
}Expand description
What one frame decodes to.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Nothing
Nothing for the consumer: a control frame, an answer the protocol reads itself, or a frame it skips.
Event(E)
One event.
Events(Vec<E>)
Several events, in order, such as one the protocol originates ahead of the update it concerns.
Error(Err)
A failure, which Protocol::recover decides.
Trait Implementations§
Auto Trait Implementations§
impl<E, Err> Freeze for Decoded<E, Err>
impl<E, Err> RefUnwindSafe for Decoded<E, Err>
impl<E, Err> Send for Decoded<E, Err>
impl<E, Err> Sync for Decoded<E, Err>
impl<E, Err> Unpin for Decoded<E, Err>
impl<E, Err> UnsafeUnpin for Decoded<E, Err>
impl<E, Err> UnwindSafe for Decoded<E, Err>
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