pub struct CliOutput<T: Serialize> {
pub success: bool,
pub data: Option<T>,
pub error: Option<CliError>,
pub platform: String,
pub command: String,
}Expand description
Unified CLI JSON output envelope.
On success, data is populated and error is None.
On failure, error is populated and data is None.
Fields with None values are omitted from serialized output.
Fields§
§success: boolWhether the command succeeded.
data: Option<T>The payload data, present only on success.
error: Option<CliError>Error details, present only on failure.
platform: StringThe detected platform (e.g. "github").
command: StringThe command that was executed (e.g. "issue create").
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for CliOutput<T>where
T: Freeze,
impl<T> RefUnwindSafe for CliOutput<T>where
T: RefUnwindSafe,
impl<T> Send for CliOutput<T>where
T: Send,
impl<T> Sync for CliOutput<T>where
T: Sync,
impl<T> Unpin for CliOutput<T>where
T: Unpin,
impl<T> UnsafeUnpin for CliOutput<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for CliOutput<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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more