#[non_exhaustive]pub enum Output<T: Serialize> {
Render(T),
Silent,
Binary {
data: Vec<u8>,
filename: String,
},
Artifact(Artifact<T>),
WithStatus {
output: Box<Output<T>>,
status: ExitStatus,
},
}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.
Render(T)
Silent
Binary
Artifact(Artifact<T>)
WithStatus
Emitted as output alone would be; the process exits with status.
Implementations§
Source§impl<T: Serialize> Output<T>
impl<T: Serialize> Output<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
pub fn is_binary(&self) -> bool
pub fn is_artifact(&self) -> bool
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for Output<T>
impl<T> RefUnwindSafe for Output<T>
impl<T> Send for Output<T>
impl<T> Sync for Output<T>
impl<T> Unpin for Output<T>
impl<T> UnsafeUnpin for Output<T>
impl<T> UnwindSafe for Output<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