pub struct PipelineLoader { /* private fields */ }Implementations§
Source§impl PipelineLoader
impl PipelineLoader
Sourcepub fn new(qed_dir: impl AsRef<Path>) -> Self
pub fn new(qed_dir: impl AsRef<Path>) -> Self
Construct a loader rooted at qed_dir. Reads
<qed_dir>/registries.toml + <qed_dir>/peers.toml opportunistically
— missing files are fine. A malformed file surfaces on the first
load* call rather than at construction so callers don’t have to
handle the error twice.
Sourcepub fn with_registries(self, registries: RegistryConfig) -> Self
pub fn with_registries(self, registries: RegistryConfig) -> Self
Replace the auto-loaded registry config. Useful in tests when the
fixture qed_dir doesn’t carry a registries.toml.
Sourcepub fn with_peers(self, peers: PeerConfig) -> Self
pub fn with_peers(self, peers: PeerConfig) -> Self
Replace the auto-loaded peer config (R494-F2). Tests construct a
fixture loader that already knows about its sibling peer camps
without needing a peers.toml on disk.
Sourcepub fn load(&self, name: &str) -> Result<Pipeline, ConfigError>
pub fn load(&self, name: &str) -> Result<Pipeline, ConfigError>
Load a pipeline by name. Resolution order:
<qed_dir>/P{n}-<name>.toml(or legacy<name>.toml)<workspace>/.github/workflows/<name>.yml(or.yaml), synthesised into a one-stepStepKind::GhaWorkflowpipeline.
Sourcepub fn has_camp_file(&self, name: &str) -> bool
pub fn has_camp_file(&self, name: &str) -> bool
Returns true when a camp-level TOML file exists for name
(prefixed or legacy form).
Sourcepub fn workspace_root(&self) -> PathBuf
pub fn workspace_root(&self) -> PathBuf
Camp root, derived from <qed_dir>/../.. (the conventional
<camp>/.yah/qed layout). Falls back to qed_dir itself when the
loader is rooted somewhere unusual (test fixtures, in-memory dirs).
Sourcepub fn list_gha_workflows(&self) -> Vec<GhaWorkflowEntry>
pub fn list_gha_workflows(&self) -> Vec<GhaWorkflowEntry>
Walk <workspace>/.github/workflows/*.yml and return parsed
workflows. Files that fail to parse are skipped (logged at warn)
so a single malformed workflow doesn’t blank the whole catalog.
Sourcepub fn list_all(&self) -> Result<Vec<String>, ConfigError>
pub fn list_all(&self) -> Result<Vec<String>, ConfigError>
List all pipeline names from <qed_dir>/*.toml, sorted by P-number
prefix (unprefixed files last).
Sourcepub fn load_and_validate_graph(
&self,
name: &str,
) -> Result<Pipeline, ConfigError>
pub fn load_and_validate_graph( &self, name: &str, ) -> Result<Pipeline, ConfigError>
Load a pipeline by name AND walk its sub-pipeline graph for cycles
and excessive nesting (R488-F1/F2). Use this before handing a
pipeline to PipelineRunner when
you want parse-time confirmation that the SubPipeline graph is
well-formed; plain Self::load skips the walk so loading
individual children doesn’t re-validate the whole graph repeatedly.
Sourcepub fn load_p_numbers(&self, names: &[String]) -> HashMap<String, u32>
pub fn load_p_numbers(&self, names: &[String]) -> HashMap<String, u32>
Return P-numbers for the requested pipeline names. Numbers come from
the numeric prefix of P{n}-{name}.toml files in <qed_dir>. Names
with no prefixed file return no entry; callers already treat
p_numbers.get(name) as Option<u32>.
Sourcepub fn list_files(&self) -> Result<Vec<String>, ConfigError>
pub fn list_files(&self) -> Result<Vec<String>, ConfigError>
List only custom pipeline files from .yah/qed/ (excludes built-ins),
returning the pipeline name (prefix stripped).
Sourcepub fn parse_from_path(&self, path: &Path) -> Result<Pipeline, ConfigError>
pub fn parse_from_path(&self, path: &Path) -> Result<Pipeline, ConfigError>
Public helper: parse a pipeline directly from a file path, bypassing
the <qed_dir>/P{n}-<name>.toml lookup. Used by qed plan <path>.toml to preview drafts that haven’t been moved into the camp
pipeline directory yet.
Trait Implementations§
Source§impl Clone for PipelineLoader
impl Clone for PipelineLoader
Source§fn clone(&self) -> PipelineLoader
fn clone(&self) -> PipelineLoader
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for PipelineLoader
impl RefUnwindSafe for PipelineLoader
impl Send for PipelineLoader
impl Sync for PipelineLoader
impl Unpin for PipelineLoader
impl UnsafeUnpin for PipelineLoader
impl UnwindSafe for PipelineLoader
Blanket Implementations§
impl<T> Allocation for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
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.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
impl<T> Fruit for T
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>
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>
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