pub struct Prefix(/* private fields */);Expand description
Strongly-typed KERI identifier prefix (e.g., "ETest123...").
A prefix is the self-addressing identifier derived from the inception event’s Blake3 hash. Always starts with ‘E’ (Blake3-256 derivation code).
Args:
- Inner
Stringshould start with'E'(enforced bynew(), not by serde).
Usage:
ⓘ
let prefix = Prefix::new("ETest123abc".to_string())?;
assert_eq!(prefix.as_str(), "ETest123abc");Implementations§
Source§impl Prefix
impl Prefix
Sourcepub fn new(s: String) -> Result<Self, KeriTypeError>
pub fn new(s: String) -> Result<Self, KeriTypeError>
Validates and wraps a KERI prefix string.
Sourcepub fn new_unchecked(s: String) -> Self
pub fn new_unchecked(s: String) -> Self
Wraps a prefix string without validation (for trusted internal paths).
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 Prefix
impl<'de> Deserialize<'de> for Prefix
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 Prefix
impl StructuralPartialEq for Prefix
Auto Trait Implementations§
impl Freeze for Prefix
impl RefUnwindSafe for Prefix
impl Send for Prefix
impl Sync for Prefix
impl Unpin for Prefix
impl UnsafeUnpin for Prefix
impl UnwindSafe for Prefix
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