pub struct AgentRegistry {
pub agents: Vec<AgentEntry>,
pub scratchpad: Vec<ScratchpadEntry>,
pub updated_at: DateTime<Utc>,
}Fields§
§agents: Vec<AgentEntry>§scratchpad: Vec<ScratchpadEntry>§updated_at: DateTime<Utc>Implementations§
Source§impl AgentRegistry
impl AgentRegistry
pub fn new() -> Self
pub fn register( &mut self, agent_type: &str, role: Option<&str>, project_root: &str, ) -> String
pub fn update_heartbeat(&mut self, agent_id: &str)
pub fn set_status( &mut self, agent_id: &str, status: AgentStatus, message: Option<&str>, )
pub fn list_active(&self, project_root: Option<&str>) -> Vec<&AgentEntry>
pub fn list_all(&self) -> &[AgentEntry]
pub fn post_message( &mut self, from_agent: &str, to_agent: Option<&str>, category: &str, message: &str, ) -> String
pub fn read_messages(&mut self, agent_id: &str) -> Vec<&ScratchpadEntry>
pub fn read_unread(&mut self, agent_id: &str) -> Vec<&ScratchpadEntry>
pub fn cleanup_stale(&mut self, max_age_hours: u64)
pub fn save(&self) -> Result<(), String>
pub fn load() -> Option<Self>
pub fn load_or_create() -> Self
Trait Implementations§
Source§impl Clone for AgentRegistry
impl Clone for AgentRegistry
Source§fn clone(&self) -> AgentRegistry
fn clone(&self) -> AgentRegistry
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 moreSource§impl Debug for AgentRegistry
impl Debug for AgentRegistry
Source§impl Default for AgentRegistry
impl Default for AgentRegistry
Source§impl<'de> Deserialize<'de> for AgentRegistry
impl<'de> Deserialize<'de> for AgentRegistry
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for AgentRegistry
impl RefUnwindSafe for AgentRegistry
impl Send for AgentRegistry
impl Sync for AgentRegistry
impl Unpin for AgentRegistry
impl UnsafeUnpin for AgentRegistry
impl UnwindSafe for AgentRegistry
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