pub struct Agent<S: Strategy> { /* private fields */ }
Expand description
The core event-driven Agent program. Defines the workflow of the agent.
The Agent
creates and manages an ECS World
, manages
AgentEvent
s sent from EventSource
s, and dispatches them.
§Type parameters
S
:Strategy
type, representing the Agent’s action selection strategy.
§Compatibility
- WASM: compatible.
Implementations§
Source§impl<S: Strategy> Agent<S>
impl<S: Strategy> Agent<S>
Sourcepub fn spawn_event_source<E: EventSource + Send + 'static>(
&mut self,
event_source: E,
on_finish: OnFinish,
)
pub fn spawn_event_source<E: EventSource + Send + 'static>( &mut self, event_source: E, on_finish: OnFinish, )
Sourcepub fn add_system<SS: System>(&mut self, system: SS)
pub fn add_system<SS: System>(&mut self, system: SS)
Add a system to the agent.
Auto Trait Implementations§
impl<S> !Freeze for Agent<S>
impl<S> !RefUnwindSafe for Agent<S>
impl<S> !Send for Agent<S>
impl<S> !Sync for Agent<S>
impl<S> Unpin for Agent<S>where
S: Unpin,
impl<S> !UnwindSafe for Agent<S>
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