pub struct Said(/* private fields */);Expand description
KERI Self-Addressing Identifier (SAID).
A Blake3 hash that uniquely identifies a KERI event. Creates the
hash chain: each event’s p (previous) field is the prior event’s SAID.
Structurally identical to Prefix (both start with ‘E’) but semantically
distinct — a prefix identifies an identity, a SAID identifies an event.
Args:
- Inner
Stringmust be non-empty (rejected on deserialize) and should start with'E'(the Blake3 digest derivation code, enforced bynew()).
Usage:
ⓘ
let said = Said::new("ESAID123".to_string())?;
assert_eq!(said.as_str(), "ESAID123");Implementations§
Source§impl Said
impl Said
Sourcepub fn new(s: String) -> Result<Said, KeriTypeError>
pub fn new(s: String) -> Result<Said, KeriTypeError>
Validates and wraps a KERI SAID string.
Only accepts E prefix (digest derivation codes).
Sourcepub fn new_unchecked(s: String) -> Said
pub fn new_unchecked(s: String) -> Said
Wraps a SAID string without validation (for compute_said() output and storage loads).
Sourcepub fn into_inner(self) -> String
pub fn into_inner(self) -> String
Consumes self and returns the inner String.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Said
impl<'de> Deserialize<'de> for Said
Source§fn deserialize<D>(
deserializer: D,
) -> Result<Said, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<Said, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Said
Source§impl Serialize for Said
impl Serialize for Said
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,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for Said
Auto Trait Implementations§
impl Freeze for Said
impl RefUnwindSafe for Said
impl Send for Said
impl Sync for Said
impl Unpin for Said
impl UnsafeUnpin for Said
impl UnwindSafe for Said
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
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
Compare self to
key and return true if they are equal.