pub struct SignablePersona<'a> {
pub persona_id: &'a str,
pub entity_id: &'a str,
pub namespace: &'a str,
pub version: i32,
pub generated_at: &'a str,
pub sources: &'a [String],
pub body_md_sha256: &'a [u8; 32],
}Expand description
The seven fields the persona signature commits to.
body_md_sha256 is the SHA-256 of the UTF-8 bytes of the rendered
persona Markdown body (the same string that lands in
memories.content). Hashing it before signing keeps the canonical
payload bounded at ~200 bytes regardless of body length — a 300-500
word persona body would otherwise dominate the signed envelope and
inflate every signed_events.payload_hash recomputation.
Fields§
§persona_id: &'a strThe Persona memory’s id (UUIDv4). Stable per (entity_id,
namespace, version) tuple — PersonaGenerator::generate mints
it before computing the signature.
entity_id: &'a strSubject the persona distils. Mirrors Persona::entity_id.
namespace: &'a strNamespace the persona was minted under.
version: i32Monotonic version counter — 1 on the first generation, then
prev + 1 per regeneration. Pinned in the signature so a
regeneration cannot replay an earlier version’s signed bytes.
generated_at: &'a strRFC3339 generation timestamp pinned in metadata.persona.generated_at.
sources: &'a [String]Source reflection ids — one derives_from edge per element.
Order matters at the byte level (the CBOR encoder preserves the
slice order); the writer pins the order to match
metadata.persona.sources.
body_md_sha256: &'a [u8; 32]SHA-256 (32 bytes) over the rendered persona Markdown body’s UTF-8 bytes. Bounds the signed payload size.
Trait Implementations§
Source§impl<'a> Clone for SignablePersona<'a>
impl<'a> Clone for SignablePersona<'a>
Source§fn clone(&self) -> SignablePersona<'a>
fn clone(&self) -> SignablePersona<'a>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl<'a> Debug for SignablePersona<'a>
impl<'a> Debug for SignablePersona<'a>
impl<'a> Eq for SignablePersona<'a>
Source§impl<'a> PartialEq for SignablePersona<'a>
impl<'a> PartialEq for SignablePersona<'a>
Source§fn eq(&self, other: &SignablePersona<'a>) -> bool
fn eq(&self, other: &SignablePersona<'a>) -> bool
self and other values to be equal, and is used by ==.impl<'a> StructuralPartialEq for SignablePersona<'a>
Auto Trait Implementations§
impl<'a> Freeze for SignablePersona<'a>
impl<'a> RefUnwindSafe for SignablePersona<'a>
impl<'a> Send for SignablePersona<'a>
impl<'a> Sync for SignablePersona<'a>
impl<'a> Unpin for SignablePersona<'a>
impl<'a> UnsafeUnpin for SignablePersona<'a>
impl<'a> UnwindSafe for SignablePersona<'a>
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,
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§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.impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more