pub struct MemoryKey(/* private fields */);Expand description
A safe namespace for memories. Resolved from the requested person name
by the application-layer route_request helper
(request.model = "bob" → MemoryKey("bob")).
Implementations§
Source§impl MemoryKey
impl MemoryKey
Sourcepub fn from_raw(s: &str) -> Result<Self, DomainError>
pub fn from_raw(s: &str) -> Result<Self, DomainError>
Validate and wrap a raw string.
Rules: non-empty, first char alphanumeric, remaining chars in
[A-Za-z0-9_.-], no path separators, no .., no leading dot.
Default namespace used when the model name carries no prefix.
pub fn as_str(&self) -> &str
Trait Implementations§
Source§impl<'de> Deserialize<'de> for MemoryKey
impl<'de> Deserialize<'de> for MemoryKey
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 MemoryKey
impl StructuralPartialEq for MemoryKey
Auto Trait Implementations§
impl Freeze for MemoryKey
impl RefUnwindSafe for MemoryKey
impl Send for MemoryKey
impl Sync for MemoryKey
impl Unpin for MemoryKey
impl UnsafeUnpin for MemoryKey
impl UnwindSafe for MemoryKey
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