pub struct ProjectMemoryRef { /* private fields */ }Expand description
An opaque reference the host may pin in its existing authoritative context.
Deserialization validates shape only. Receiving this value never grants Project access. A host must authorize the Project separately before reads.
Implementations§
Source§impl ProjectMemoryRef
impl ProjectMemoryRef
pub fn new( project_id: ProjectId, memory_id: impl Into<String>, content_version: impl Into<String>, ) -> Result<ProjectMemoryRef, Error>
Sourcepub fn from_document(
document: &DurableMemoryDocument,
) -> Result<ProjectMemoryRef, Error>
pub fn from_document( document: &DurableMemoryDocument, ) -> Result<ProjectMemoryRef, Error>
Capture a host-selected Project document for an explicit source-adoption step. This does not adopt the reference or confirm any claim in its body.
v1 hashes a domain-separated JSON tuple of the complete typed frontmatter and body. Filesystem location is excluded; source/status/metadata changes invalidate the pin. Hosts must not treat a timestamp or Session ID alone as this version, or reuse this version as an event/ingestion watermark.
pub fn project_id(&self) -> &ProjectId
pub fn memory_id(&self) -> &str
pub fn content_version(&self) -> &str
Sourcepub fn source_key(&self) -> String
pub fn source_key(&self) -> String
A collision-free source-map key for this Project and memory identity. The key is a locator, not a path to open or an authorization token.
Trait Implementations§
Source§impl Clone for ProjectMemoryRef
impl Clone for ProjectMemoryRef
Source§fn clone(&self) -> ProjectMemoryRef
fn clone(&self) -> ProjectMemoryRef
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ProjectMemoryRef
impl Debug for ProjectMemoryRef
Source§impl<'de> Deserialize<'de> for ProjectMemoryRef
impl<'de> Deserialize<'de> for ProjectMemoryRef
Source§fn deserialize<D>(
deserializer: D,
) -> Result<ProjectMemoryRef, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<ProjectMemoryRef, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
impl Eq for ProjectMemoryRef
Source§impl PartialEq for ProjectMemoryRef
impl PartialEq for ProjectMemoryRef
Source§impl Serialize for ProjectMemoryRef
impl Serialize for ProjectMemoryRef
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl StructuralPartialEq for ProjectMemoryRef
Auto Trait Implementations§
impl Freeze for ProjectMemoryRef
impl RefUnwindSafe for ProjectMemoryRef
impl Send for ProjectMemoryRef
impl Sync for ProjectMemoryRef
impl Unpin for ProjectMemoryRef
impl UnsafeUnpin for ProjectMemoryRef
impl UnwindSafe for ProjectMemoryRef
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.