pub struct WorkflowManager { /* private fields */ }Expand description
Workflow manager for discovering and loading workflow files
Implementations§
Source§impl WorkflowManager
impl WorkflowManager
Sourcepub fn new() -> Self
pub fn new() -> Self
Create a new workflow manager
This will use the default workflows directory:
.gestura/workflows/in current directory (if exists)~/.local/share/gestura/workflows/(fallback)
Sourcepub fn with_dir(dir: impl Into<PathBuf>) -> Self
pub fn with_dir(dir: impl Into<PathBuf>) -> Self
Create a workflow manager with a custom directory
Sourcepub fn default_workflows_dir() -> PathBuf
pub fn default_workflows_dir() -> PathBuf
Get the default workflows directory
Precedence:
.gestura/workflows/in current directory (if exists)~/.local/share/gestura/workflows/(fallback)
Sourcepub fn workflows_dir(&self) -> &Path
pub fn workflows_dir(&self) -> &Path
Get the workflows directory path
Sourcepub fn list_workflows(&self) -> Result<Vec<WorkflowInfo>, WorkflowError>
pub fn list_workflows(&self) -> Result<Vec<WorkflowInfo>, WorkflowError>
List all available workflows (metadata only, no content)
Sourcepub fn load_workflow(&self, name: &str) -> Result<Workflow, WorkflowError>
pub fn load_workflow(&self, name: &str) -> Result<Workflow, WorkflowError>
Load a workflow by name
The name should be the filename without the .md extension.
For example, to load code-review.md, use load_workflow("code-review").
Sourcepub fn workflow_exists(&self, name: &str) -> bool
pub fn workflow_exists(&self, name: &str) -> bool
Check if a workflow exists
Sourcepub fn ensure_workflows_dir(&self) -> Result<(), WorkflowError>
pub fn ensure_workflows_dir(&self) -> Result<(), WorkflowError>
Create the workflows directory if it doesn’t exist
Trait Implementations§
Auto Trait Implementations§
impl Freeze for WorkflowManager
impl RefUnwindSafe for WorkflowManager
impl Send for WorkflowManager
impl Sync for WorkflowManager
impl Unpin for WorkflowManager
impl UnwindSafe for WorkflowManager
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
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Applies the layer to a service and wraps it in [
Layered].