pub struct StepNaming { /* private fields */ }Expand description
GH #23 — the single addressing-space table for one Blueprint’s dispatched steps. See the module doc for the construction site and storage/accessor threading; this doc covers the resolution rules.
§Canonical / alias resolution
For every distinct Step.ref appearing anywhere in the flow (Seq /
Branch / Fanout / Loop / Try nesting all walked — see
Self::from_blueprint):
canonical= the dispatching agent’sAgentMeta.projection_namewhen declared, else theStep.refitself (byte-identical to pre-GH-#23 behavior for undeclared Blueprints).aliases={Step.ref}∪ everyoutPath expr’s top-level segment seen across every occurrence of thatrefin the flow ("$.plan"→"plan","$.a.b"→"a"; a non-Pathoutcontributes nothing — best-effort, mirroringblueprint::compiler’s existing static-walk convention of skipping what can’t be inspected structurally).
Every name (canonical + every alias) is checked for cross-step
collisions. A clash where either side declared projection_name is a
hard StepNamingError (registration is rejected outright). A clash
between two undeclared steps is a soft StepNamingWarning: the
pre-GH-#23 union rule’s “data-plane wins” precedence is preserved by
letting the step whose OWN ref equals the contested name own it in
Self::resolve — an alias derived merely from another step’s out
segment never displaces it.
Implementations§
Source§impl StepNaming
impl StepNaming
Sourcepub fn resolve(&self, name: &str) -> Option<&str>
pub fn resolve(&self, name: &str) -> Option<&str>
Resolve name (canonical or alias) to its canonical name.
Sourcepub fn canonical_of_producer(&self, ref_name: &str) -> Option<&str>
pub fn canonical_of_producer(&self, ref_name: &str) -> Option<&str>
Resolve a Step’s data-plane producer name (Step.ref /
AgentDef.name) to its canonical name.
Sourcepub fn names(&self) -> impl Iterator<Item = &str>
pub fn names(&self) -> impl Iterator<Item = &str>
Every canonical name this table declares (subtask-2/3 enumeration
consumers, e.g. McpQueryAdapter::enumerate_steps).
Sourcepub fn entries(&self) -> impl Iterator<Item = &StepNameEntry>
pub fn entries(&self) -> impl Iterator<Item = &StepNameEntry>
Every full StepNameEntry (canonical + aliases) this table
holds.
Sourcepub fn from_blueprint(
bp: &Blueprint,
) -> Result<(StepNaming, Vec<StepNamingWarning>), StepNamingError>
pub fn from_blueprint( bp: &Blueprint, ) -> Result<(StepNaming, Vec<StepNamingWarning>), StepNamingError>
Build the table from a Blueprint’s flow + agents — the sole
construction site (see the module + struct docs). Returns the
table plus any soft StepNamingWarnings (the caller decides
how to log them, typically via tracing::warn!); a hard
collision returns StepNamingError instead.
Trait Implementations§
Source§impl Clone for StepNaming
impl Clone for StepNaming
Source§fn clone(&self) -> StepNaming
fn clone(&self) -> StepNaming
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for StepNaming
impl Debug for StepNaming
Source§impl Default for StepNaming
impl Default for StepNaming
Source§fn default() -> StepNaming
fn default() -> StepNaming
Auto Trait Implementations§
impl Freeze for StepNaming
impl RefUnwindSafe for StepNaming
impl Send for StepNaming
impl Sync for StepNaming
impl Unpin for StepNaming
impl UnsafeUnpin for StepNaming
impl UnwindSafe for StepNaming
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
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> 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