#[non_exhaustive]pub enum Summary<T: Serialize> {
Render(T),
Silent,
WithStatus {
summary: Box<Summary<T>>,
status: ExitStatus,
},
}Expand description
What a command that declares events returns once the events are done: they already carried the run’s results, so a payload has nowhere left to go.
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.
Implementations§
Source§impl<T: Serialize> Summary<T>
impl<T: Serialize> Summary<T>
Sourcepub fn with_exit_status(self, status: ExitStatus) -> Self
pub fn with_exit_status(self, status: ExitStatus) -> Self
A signal beside the result, never a failure; a later call replaces the earlier status.
pub fn split_exit_status(self) -> (Self, Option<ExitStatus>)
pub fn exit_status(&self) -> ExitStatus
pub fn map_render(self, f: impl FnOnce(T) -> T) -> Self
pub fn is_render(&self) -> bool
pub fn is_silent(&self) -> bool
Trait Implementations§
Source§impl<T: Serialize, E: Serialize + 'static> HandlerOutcome<T, E> for Summary<T>
impl<T: Serialize, E: Serialize + 'static> HandlerOutcome<T, E> for Summary<T>
fn into_output(self) -> Output<T>
Auto Trait Implementations§
impl<T> Freeze for Summary<T>
impl<T> RefUnwindSafe for Summary<T>
impl<T> Send for Summary<T>
impl<T> Sync for Summary<T>
impl<T> Unpin for Summary<T>
impl<T> UnsafeUnpin for Summary<T>
impl<T> UnwindSafe for Summary<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