pub enum Output<T: Serialize> {
Render(T),
Silent,
Binary {
data: Vec<u8>,
filename: String,
},
}Expand description
What a handler produces.
This enum represents the different types of output a command handler can produce.
Variants§
Render(T)
Data to render with a template or serialize to JSON/YAML/etc.
Silent
Silent exit (no output produced)
Binary
Binary output for file exports
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for Output<T>where
T: Freeze,
impl<T> RefUnwindSafe for Output<T>where
T: RefUnwindSafe,
impl<T> Send for Output<T>where
T: Send,
impl<T> Sync for Output<T>where
T: Sync,
impl<T> Unpin for Output<T>where
T: Unpin,
impl<T> UnwindSafe for Output<T>where
T: UnwindSafe,
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