pub struct ScopeAddress {
pub scope: MemoryScope,
pub id: String,
}Expand description
A MemoryScope plus the concrete scope id (agent id, user id, team id,
run id, or the tenant name). Scope ids are tenant-relative names: the
store namespaces every record under its tenant, so an id never needs to
re-encode the tenant it belongs to.
Fields§
§scope: MemoryScopeThe taxonomy member.
id: StringThe concrete id inside the scope (e.g. researcher-7 for
agent-scoped memory).
Implementations§
Source§impl ScopeAddress
impl ScopeAddress
Sourcepub fn new(scope: MemoryScope, id: impl Into<String>) -> Self
pub fn new(scope: MemoryScope, id: impl Into<String>) -> Self
Build an address; validation of the id happens at the write gate, not here (addresses also arrive from stored evidence).
Sourcepub fn as_address(&self) -> String
pub fn as_address(&self) -> String
The canonical "{scope}:{id}" string form, used in derived effect
keys (memory:{scope}:{memory_id}) and human-facing provenance.
Trait Implementations§
Source§impl Clone for ScopeAddress
impl Clone for ScopeAddress
Source§impl Debug for ScopeAddress
impl Debug for ScopeAddress
Source§impl<'de> Deserialize<'de> for ScopeAddress
impl<'de> Deserialize<'de> for ScopeAddress
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
impl Eq for ScopeAddress
Source§impl Hash for ScopeAddress
impl Hash for ScopeAddress
Source§impl PartialEq for ScopeAddress
impl PartialEq for ScopeAddress
Source§impl Serialize for ScopeAddress
impl Serialize for ScopeAddress
impl StructuralPartialEq for ScopeAddress
Auto Trait Implementations§
impl Freeze for ScopeAddress
impl RefUnwindSafe for ScopeAddress
impl Send for ScopeAddress
impl Sync for ScopeAddress
impl Unpin for ScopeAddress
impl UnsafeUnpin for ScopeAddress
impl UnwindSafe for ScopeAddress
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