pub struct HandleOutcome {
pub events: Vec<ClientEvent>,
pub error: Option<Error>,
}Expand description
What ClientSession::handle_data decoded from one chunk of inbound
bytes: every event produced, and the terminal error that stopped decoding,
if any. The events are valid even when error is Some — they were
decoded before the failure and are never discarded with it.
Fields§
§events: Vec<ClientEvent>Events decoded from the input, in wire order.
error: Option<Error>The terminal error that ended decoding (framing lost), if any.
Implementations§
Source§impl HandleOutcome
impl HandleOutcome
Sourcepub fn into_result(self) -> Result<Vec<ClientEvent>>
pub fn into_result(self) -> Result<Vec<ClientEvent>>
All-or-nothing view: Ok(events) when decoding ran clean, else the
error (dropping the events - prefer reading the fields when they
matter).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for HandleOutcome
impl RefUnwindSafe for HandleOutcome
impl Send for HandleOutcome
impl Sync for HandleOutcome
impl Unpin for HandleOutcome
impl UnsafeUnpin for HandleOutcome
impl UnwindSafe for HandleOutcome
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