pub struct LinkSetRegistry { /* private fields */ }Expand description
Per-scheme registry. Wrapped in tokio::sync::RwLock inside
super::PvDatabase so registration and read-paths are
independently mutable.
Implementations§
Source§impl LinkSetRegistry
impl LinkSetRegistry
pub fn new() -> Self
Sourcepub fn register(&mut self, scheme: &str, lset: DynLinkSet)
pub fn register(&mut self, scheme: &str, lset: DynLinkSet)
Register lset under scheme. Subsequent calls for the same
scheme replace the previous binding.
Sourcepub fn get(&self, scheme: &str) -> Option<DynLinkSet>
pub fn get(&self, scheme: &str) -> Option<DynLinkSet>
Look up the lset for scheme. Returns None when nothing is
registered under that scheme.
pub fn is_empty(&self) -> bool
Trait Implementations§
Source§impl Default for LinkSetRegistry
impl Default for LinkSetRegistry
Source§fn default() -> LinkSetRegistry
fn default() -> LinkSetRegistry
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for LinkSetRegistry
impl !UnwindSafe for LinkSetRegistry
impl Freeze for LinkSetRegistry
impl Send for LinkSetRegistry
impl Sync for LinkSetRegistry
impl Unpin for LinkSetRegistry
impl UnsafeUnpin for LinkSetRegistry
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