pub struct MemoryRegionConfig {
pub region_id: Uuid,
pub region_type: MemoryRegion,
pub owner_agent_id: Uuid,
pub team_id: Option<Uuid>,
pub readers: Vec<Uuid>,
pub writers: Vec<Uuid>,
pub require_lock: bool,
pub conflict_resolution: ConflictResolution,
pub version_tracking: bool,
}Expand description
Configuration for a memory region.
Fields§
§region_id: UuidUnique identifier for this region
region_type: MemoryRegionType of region
owner_agent_id: UuidAgent that owns this region
team_id: Option<Uuid>Team this region belongs to (if applicable)
readers: Vec<Uuid>Agents with read access
writers: Vec<Uuid>Agents with write access
require_lock: boolWhether writes require a lock
conflict_resolution: ConflictResolutionHow to resolve conflicts
version_tracking: boolWhether to track versions
Implementations§
Source§impl MemoryRegionConfig
impl MemoryRegionConfig
Sourcepub fn collaborative(owner_agent_id: Uuid) -> Self
pub fn collaborative(owner_agent_id: Uuid) -> Self
Create a new collaborative region.
Sourcepub fn add_reader(&mut self, agent_id: Uuid)
pub fn add_reader(&mut self, agent_id: Uuid)
Add a reader to the region.
Sourcepub fn add_writer(&mut self, agent_id: Uuid)
pub fn add_writer(&mut self, agent_id: Uuid)
Add a writer to the region.
Trait Implementations§
Source§impl Clone for MemoryRegionConfig
impl Clone for MemoryRegionConfig
Source§fn clone(&self) -> MemoryRegionConfig
fn clone(&self) -> MemoryRegionConfig
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 ComposeSchema for MemoryRegionConfig
impl ComposeSchema for MemoryRegionConfig
Source§impl Debug for MemoryRegionConfig
impl Debug for MemoryRegionConfig
Source§impl<'de> Deserialize<'de> for MemoryRegionConfig
impl<'de> Deserialize<'de> for MemoryRegionConfig
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
Source§impl PartialEq for MemoryRegionConfig
impl PartialEq for MemoryRegionConfig
Source§impl Serialize for MemoryRegionConfig
impl Serialize for MemoryRegionConfig
Source§impl ToSchema for MemoryRegionConfig
impl ToSchema for MemoryRegionConfig
impl StructuralPartialEq for MemoryRegionConfig
Auto Trait Implementations§
impl Freeze for MemoryRegionConfig
impl RefUnwindSafe for MemoryRegionConfig
impl Send for MemoryRegionConfig
impl Sync for MemoryRegionConfig
impl Unpin for MemoryRegionConfig
impl UnwindSafe for MemoryRegionConfig
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