pub struct AgentStorage {
db: Arc<Database>,
}Fields§
§db: Arc<Database>Implementations§
Source§impl AgentStorage
impl AgentStorage
pub fn new(db: Arc<Database>) -> Result<Self>
pub fn create_agent( &self, name: String, agent: AgentNode, ) -> Result<StoredAgent>
pub fn get_agent(&self, id: String) -> Result<Option<StoredAgent>>
pub fn list_agents(&self) -> Result<Vec<StoredAgent>>
pub fn update_agent( &self, id: String, name: Option<String>, agent: Option<AgentNode>, ) -> Result<StoredAgent>
pub fn delete_agent(&self, id: String) -> Result<()>
Auto Trait Implementations§
impl Freeze for AgentStorage
impl !RefUnwindSafe for AgentStorage
impl Send for AgentStorage
impl Sync for AgentStorage
impl Unpin for AgentStorage
impl !UnwindSafe for AgentStorage
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