pub enum WorkflowCommand {
Simple(String),
Structured(Box<Command>),
WorkflowStep(Box<WorkflowStepCommand>),
SimpleObject(SimpleCommand),
}Variants§
Simple(String)
Legacy string format
Structured(Box<Command>)
Full structured format (check before WorkflowStep since it’s more specific)
WorkflowStep(Box<WorkflowStepCommand>)
New workflow step format (must have claude or shell field)
SimpleObject(SimpleCommand)
Simple object format
Implementations§
Source§impl WorkflowCommand
impl WorkflowCommand
Sourcepub fn to_command(&self) -> Command
pub fn to_command(&self) -> Command
Convert a WorkflowCommand to a unified Command representation
This method handles the conversion of various workflow command formats
into a unified Command type suitable for execution. The conversion flow:
- Simple: Direct string parsing via
Command::from_string - Structured: Clone the boxed Command
- WorkflowStep: Extract command string, parse, and apply metadata
- SimpleObject: Build command with optional args and metadata
The method uses helper functions to maintain low complexity:
extract_command_string: Handles command type branchingapply_workflow_metadata: Configures commit and analysis settingsbuild_simple_command: Constructs from SimpleCommand object
Trait Implementations§
Source§impl Clone for WorkflowCommand
impl Clone for WorkflowCommand
Source§fn clone(&self) -> WorkflowCommand
fn clone(&self) -> WorkflowCommand
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 WorkflowCommand
impl Debug for WorkflowCommand
Source§impl<'de> Deserialize<'de> for WorkflowCommand
impl<'de> Deserialize<'de> for WorkflowCommand
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for WorkflowCommand
impl PartialEq for WorkflowCommand
Source§fn eq(&self, other: &WorkflowCommand) -> bool
fn eq(&self, other: &WorkflowCommand) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for WorkflowCommand
impl Serialize for WorkflowCommand
impl StructuralPartialEq for WorkflowCommand
Auto Trait Implementations§
impl Freeze for WorkflowCommand
impl RefUnwindSafe for WorkflowCommand
impl Send for WorkflowCommand
impl Sync for WorkflowCommand
impl Unpin for WorkflowCommand
impl UnsafeUnpin for WorkflowCommand
impl UnwindSafe for WorkflowCommand
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
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