pub struct DependencyStore;Expand description
Stateless store for agent-to-agent dependency tracking.
Follows the MessageStore pattern: methods take &SqliteGraph as first parameter.
Implementations§
Source§impl DependencyStore
impl DependencyStore
pub fn new() -> Self
Sourcepub fn create(
&self,
graph: &SqliteGraph,
dependent_agent: String,
blocker_agent: String,
reason: String,
) -> Result<AgentDependency>
pub fn create( &self, graph: &SqliteGraph, dependent_agent: String, blocker_agent: String, reason: String, ) -> Result<AgentDependency>
Create a dependency: dependent is blocked on blocker.
Sourcepub fn find_by_blocker(
&self,
graph: &SqliteGraph,
blocker_agent: &str,
) -> Result<Vec<AgentDependency>>
pub fn find_by_blocker( &self, graph: &SqliteGraph, blocker_agent: &str, ) -> Result<Vec<AgentDependency>>
Find all unresolved dependencies where the given agent is the blocker.
Sourcepub fn find_by_dependent(
&self,
graph: &SqliteGraph,
dependent_agent: &str,
) -> Result<Vec<AgentDependency>>
pub fn find_by_dependent( &self, graph: &SqliteGraph, dependent_agent: &str, ) -> Result<Vec<AgentDependency>>
Find all unresolved dependencies where the given agent is blocked.
Sourcepub fn resolve(
&self,
graph: &SqliteGraph,
dependency_id: &str,
) -> Result<AgentDependency>
pub fn resolve( &self, graph: &SqliteGraph, dependency_id: &str, ) -> Result<AgentDependency>
Resolve (close) a dependency by ID.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DependencyStore
impl RefUnwindSafe for DependencyStore
impl Send for DependencyStore
impl Sync for DependencyStore
impl Unpin for DependencyStore
impl UnsafeUnpin for DependencyStore
impl UnwindSafe for DependencyStore
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
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