pub enum DispatchOutcome {
Ok(usize),
AppError(usize),
}Expand description
Successful dispatch outcome: how many bytes were written to output and
which ResponseStatus the dispatch layer should emit.
Both variants hold the byte count written into the shim’s output buffer.
Ok— command succeeded;output[..n]holds the postcard-serialized return value.AppError— command returned a user-defined application error;output[..n]holds the postcard-serializedtelepath_wire::AppErrorPayload.
DispatchError (the Err channel) is reserved for system-level failures
where dispatch could not complete (unknown ID, deserialize failure, etc.).
Variants§
Ok(usize)
Command ran and produced a serialized return value of n bytes.
AppError(usize)
Command ran and produced a serialized telepath_wire::AppErrorPayload
of n bytes.
Trait Implementations§
Source§impl Clone for DispatchOutcome
impl Clone for DispatchOutcome
Source§fn clone(&self) -> DispatchOutcome
fn clone(&self) -> DispatchOutcome
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DispatchOutcome
impl Debug for DispatchOutcome
Source§impl PartialEq for DispatchOutcome
impl PartialEq for DispatchOutcome
Source§fn eq(&self, other: &DispatchOutcome) -> bool
fn eq(&self, other: &DispatchOutcome) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Copy for DispatchOutcome
impl Eq for DispatchOutcome
impl StructuralPartialEq for DispatchOutcome
Auto Trait Implementations§
impl Freeze for DispatchOutcome
impl RefUnwindSafe for DispatchOutcome
impl Send for DispatchOutcome
impl Sync for DispatchOutcome
impl Unpin for DispatchOutcome
impl UnsafeUnpin for DispatchOutcome
impl UnwindSafe for DispatchOutcome
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