pub struct WorkflowManager { /* private fields */ }Expand description
Workflow manager for discovering and loading workflow files
Implementations§
Source§impl WorkflowManager
impl WorkflowManager
Sourcepub fn new() -> WorkflowManager
pub fn new() -> WorkflowManager
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>) -> WorkflowManager
pub fn with_dir(dir: impl Into<PathBuf>) -> WorkflowManager
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§
Source§impl Default for WorkflowManager
impl Default for WorkflowManager
Source§fn default() -> WorkflowManager
fn default() -> WorkflowManager
Returns the “default value” for a type. Read more
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> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
§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>
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§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].§impl<T> NoneValue for Twhere
T: Default,
impl<T> NoneValue for Twhere
T: Default,
type NoneType = T
§fn null_value() -> T
fn null_value() -> T
The none-equivalent value.
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian().