pub struct FormationAssemblySuggestor { /* private fields */ }Expand description
Assembles a formation by matching required roles to available suggestors.
§Construction
ⓘ
let mut catalog = Vec::new();
register_profiled(&mut engine, &mut catalog, analysis_suggestor);
register_profiled(&mut engine, &mut catalog, planning_suggestor);
engine.register_suggestor(FormationAssemblySuggestor::new(catalog));Implementations§
Source§impl FormationAssemblySuggestor
impl FormationAssemblySuggestor
pub fn new(catalog: Vec<ProfileSnapshot>) -> FormationAssemblySuggestor
Trait Implementations§
Source§impl Suggestor for FormationAssemblySuggestor
impl Suggestor for FormationAssemblySuggestor
Source§fn dependencies(&self) -> &[ContextKey]
fn dependencies(&self) -> &[ContextKey]
Context keys this suggestor reads from. Read more
Source§fn accepts(&self, ctx: &dyn Context) -> bool
fn accepts(&self, ctx: &dyn Context) -> bool
Pure predicate: should this suggestor execute given the current context? Read more
Source§fn execute<'life0, 'life1, 'async_trait>(
&'life0 self,
ctx: &'life1 dyn Context,
) -> Pin<Box<dyn Future<Output = AgentEffect> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
FormationAssemblySuggestor: 'async_trait,
fn execute<'life0, 'life1, 'async_trait>(
&'life0 self,
ctx: &'life1 dyn Context,
) -> Pin<Box<dyn Future<Output = AgentEffect> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
FormationAssemblySuggestor: 'async_trait,
Produce effects given the current context. Read more
Source§fn provenance(&self) -> &'static str
fn provenance(&self) -> &'static str
Canonical provenance string carried on every fact this
suggestor emits, as produced by its
ProvenanceSource. Read moreAuto Trait Implementations§
impl Freeze for FormationAssemblySuggestor
impl RefUnwindSafe for FormationAssemblySuggestor
impl Send for FormationAssemblySuggestor
impl Sync for FormationAssemblySuggestor
impl Unpin for FormationAssemblySuggestor
impl UnsafeUnpin for FormationAssemblySuggestor
impl UnwindSafe for FormationAssemblySuggestor
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