pub struct Compiler { /* private fields */ }Expand description
Turns a Blueprint into a CompiledBlueprint by resolving every
AgentDef against a SpawnerRegistry. One-shot: build a fresh
Compiler per compile() call (or reuse it — it holds no
per-compile state).
Implementations§
Source§impl Compiler
impl Compiler
Sourcepub fn new(registry: SpawnerRegistry) -> Self
pub fn new(registry: SpawnerRegistry) -> Self
Build a Compiler around the given SpawnerRegistry, with no
default spawner (unresolved flow refs are an error unless
with_default is chained on).
Sourcepub fn with_default(self, sp: Arc<dyn SpawnerAdapter>) -> Self
pub fn with_default(self, sp: Arc<dyn SpawnerAdapter>) -> Self
Set a default spawner — used for flow refs (and unregistered
AgentKinds under non-strict strategy) that don’t resolve
against any AgentDef/SpawnerRegistry entry.
Sourcepub fn compile(&self, bp: &Blueprint) -> Result<CompiledBlueprint, CompileError>
pub fn compile(&self, bp: &Blueprint) -> Result<CompiledBlueprint, CompileError>
Resolve every Blueprint.agents entry through the registry,
validate operator_refs and flow refs per Blueprint.strategy,
and return the routing table alongside the untouched flow and
metadata.
Auto Trait Implementations§
impl !RefUnwindSafe for Compiler
impl !UnwindSafe for Compiler
impl Freeze for Compiler
impl Send for Compiler
impl Sync for Compiler
impl Unpin for Compiler
impl UnsafeUnpin for Compiler
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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