pub struct Namespace;Expand description
Namespace manager
Implementations§
Source§impl Namespace
impl Namespace
Sourcepub fn extract_agent_id(key: &str) -> Option<String>
pub fn extract_agent_id(key: &str) -> Option<String>
Extract agent ID from namespace
Sourcepub fn extract_key(key: &str) -> Option<String>
pub fn extract_key(key: &str) -> Option<String>
Extract key from namespace
Sourcepub fn belongs_to_agent(key: &str, agent_id: &str) -> bool
pub fn belongs_to_agent(key: &str, agent_id: &str) -> bool
Check if key belongs to agent
Sourcepub fn get_agent_ids(keys: &[String]) -> HashSet<String>
pub fn get_agent_ids(keys: &[String]) -> HashSet<String>
Get all unique agent IDs from keys
Sourcepub fn agent_prefix(agent_id: &str) -> String
pub fn agent_prefix(agent_id: &str) -> String
Get namespace prefix for agent
Sourcepub fn has_prefix(key: &str, prefix: &str) -> bool
pub fn has_prefix(key: &str, prefix: &str) -> bool
Check if key matches prefix
Auto Trait Implementations§
impl Freeze for Namespace
impl RefUnwindSafe for Namespace
impl Send for Namespace
impl Sync for Namespace
impl Unpin for Namespace
impl UnwindSafe for Namespace
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