pub struct YoAgentRuntime<S: EventStore> { /* private fields */ }Implementations§
Source§impl<S: EventStore> YoAgentRuntime<S>
impl<S: EventStore> YoAgentRuntime<S>
pub fn new(state: YoAgentState<S>) -> Self
pub fn state(&self) -> YoAgentState<S>
pub fn register_pack(&mut self, pack: Pack)
pub fn register_behavior<B>(&mut self, behavior: B)where
B: Behavior + 'static,
pub fn register_policy(&mut self, policy: Policy)
pub async fn emit_event(&self, event: Event) -> Result<EventId, StateError>
pub async fn create_typed_node( &self, actor: ActorRef, id: NodeId, kind: impl Into<String>, props: Value, ) -> Result<EventId, StateError>
pub async fn create_typed_relation( &self, actor: ActorRef, from: NodeId, rel: impl Into<String>, to: NodeId, props: Value, ) -> Result<EventId, StateError>
pub async fn request_approval( &self, policy_id: PolicyId, action: PolicyAction, target: Option<NodeId>, requested_by: ActorRef, reason: Option<String>, ) -> Result<EventId, StateError>
pub async fn approve_request( &self, actor: ActorRef, request_id: NodeId, reason: Option<String>, ) -> Result<EventId, StateError>
pub async fn reject_request( &self, actor: ActorRef, request_id: NodeId, reason: Option<String>, ) -> Result<EventId, StateError>
pub async fn graph(&self) -> GraphSnapshot
Auto Trait Implementations§
impl<S> !RefUnwindSafe for YoAgentRuntime<S>
impl<S> !UnwindSafe for YoAgentRuntime<S>
impl<S> Freeze for YoAgentRuntime<S>
impl<S> Send for YoAgentRuntime<S>
impl<S> Sync for YoAgentRuntime<S>
impl<S> Unpin for YoAgentRuntime<S>
impl<S> UnsafeUnpin for YoAgentRuntime<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