pub struct AgentStore { /* private fields */ }Implementations§
Source§impl AgentStore
impl AgentStore
pub fn new(db: Database) -> AgentStore
pub async fn save(&self, agent: &Agent) -> Result<(), ServerError>
pub async fn get(&self, agent_id: &str) -> Result<Option<Agent>, ServerError>
pub async fn list_by_workspace( &self, workspace_id: &str, ) -> Result<Vec<Agent>, ServerError>
pub async fn list_by_parent( &self, parent_id: &str, ) -> Result<Vec<Agent>, ServerError>
pub async fn list_by_role( &self, workspace_id: &str, role: &AgentRole, ) -> Result<Vec<Agent>, ServerError>
pub async fn list_by_status( &self, workspace_id: &str, status: &AgentStatus, ) -> Result<Vec<Agent>, ServerError>
pub async fn delete(&self, agent_id: &str) -> Result<(), ServerError>
pub async fn update_status( &self, agent_id: &str, status: &AgentStatus, ) -> Result<(), ServerError>
Trait Implementations§
Source§impl Clone for AgentStore
impl Clone for AgentStore
Source§fn clone(&self) -> AgentStore
fn clone(&self) -> AgentStore
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for AgentStore
impl RefUnwindSafe for AgentStore
impl Send for AgentStore
impl Sync for AgentStore
impl Unpin for AgentStore
impl UnsafeUnpin for AgentStore
impl UnwindSafe for AgentStore
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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