pub struct SimpleGraphIo {
pub agent: Arc<dyn AgentIo>,
pub personas: PersonaLoader,
pub conditions: Conditions,
}Expand description
A GraphIo built from plain fields: an agent io, a persona loader and
conditions. Good for tests, examples and single-user hosts.
new starts with the built-in conditions.
Fields§
§agent: Arc<dyn AgentIo>§personas: PersonaLoader§conditions: ConditionsImplementations§
Source§impl SimpleGraphIo
impl SimpleGraphIo
Sourcepub fn new(agent: Arc<dyn AgentIo>, personas: PersonaLoader) -> Self
pub fn new(agent: Arc<dyn AgentIo>, personas: PersonaLoader) -> Self
Builds an io over agent and personas with only the built-in
flag condition; add more through the conditions field.
Returns the io.
Trait Implementations§
Source§impl GraphIo for SimpleGraphIo
impl GraphIo for SimpleGraphIo
fn agent(&self) -> &dyn AgentIo
fn persona<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Persona, AgentError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn conditions(&self) -> &Conditions
Source§fn persona_trace<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Option<TraceSpec>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn persona_trace<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Option<TraceSpec>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Returns the trace settings of persona
name, applied to the agent
run of every node using it. The default is None, no tracing.
Input: the persona name. Output: the spec.Auto Trait Implementations§
impl !RefUnwindSafe for SimpleGraphIo
impl !UnwindSafe for SimpleGraphIo
impl Forget for SimpleGraphIo
impl Freeze for SimpleGraphIo
impl Move for SimpleGraphIo
impl Send for SimpleGraphIo
impl Sync for SimpleGraphIo
impl Unpin for SimpleGraphIo
impl UnsafeUnpin for SimpleGraphIowhere
*const ArcInner<dyn AgentIo> is !null: UnsafeUnpin,
PhantomData<ArcInner<dyn AgentIo>>: UnsafeUnpin,
*const u8 is !null: UnsafeUnpin,
PhantomData<Arc<dyn PersonaSource>>: UnsafeUnpin,
PhantomData<(String, Arc<dyn Fn(&Map<String, Value>, &[Value]) -> Result<String, String> + Sync + Send>)>: UnsafeUnpin,
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