pub struct NamespaceRegistry { /* private fields */ }Implementations§
Source§impl NamespaceRegistry
impl NamespaceRegistry
pub fn new_empty(root: PathBuf) -> Result<Self, RegistryError>
pub fn from_file(path: impl AsRef<Path>) -> Result<Self, RegistryError>
pub fn discover(start: impl AsRef<Path>) -> Result<Option<Self>, RegistryError>
pub fn root(&self) -> &Path
pub fn default_namespace(&self) -> &str
pub fn namespace_for(&self, path: impl AsRef<Path>) -> Option<&str>
pub fn namespace_for_with_options( &self, path: impl AsRef<Path>, fail_on_ambiguity: bool, ) -> Result<&str, RegistryError>
pub fn resolve_files(&self) -> Result<Vec<NamespaceBinding>, RegistryError>
pub fn resolve_files_with_options( &self, fail_on_ambiguity: bool, ) -> Result<Vec<NamespaceBinding>, RegistryError>
Trait Implementations§
Source§impl Clone for NamespaceRegistry
impl Clone for NamespaceRegistry
Auto Trait Implementations§
impl Forget for NamespaceRegistry
impl Freeze for NamespaceRegistry
impl Move for NamespaceRegistry
impl RefUnwindSafe for NamespaceRegistrywhere
Atomic<usize>: RefUnwindSafe,
Pool<Cache, Box<dyn Fn() -> Cache + UnwindSafe + RefUnwindSafe + Send + Sync>>: RefUnwindSafe,
Pool<PatternSet, Box<dyn Fn() -> PatternSet + UnwindSafe + RefUnwindSafe + Send + Sync>>: RefUnwindSafe,
impl Send for NamespaceRegistrywhere
RawVecInner: Send,
RawTable<(Vec<u8>, Vec<usize>)>: Send,
Arc<dyn AcAutomaton>: Send,
RawTable<(Vec<u8>, Vec<(usize, Regex)>)>: Send,
Arc<RegexI>: Send,
BoxRaw<Pool<Cache, Box<dyn Fn() -> Cache + UnwindSafe + RefUnwindSafe + Send + Sync>>>: Send,
Arc<Pool<PatternSet, Box<dyn Fn() -> PatternSet + UnwindSafe + RefUnwindSafe + Send + Sync>>>: Send,
impl Sync for NamespaceRegistrywhere
RawVecInner: Sync,
RawTable<(Vec<u8>, Vec<usize>)>: Sync,
Arc<dyn AcAutomaton>: Sync,
RawTable<(Vec<u8>, Vec<(usize, Regex)>)>: Sync,
Arc<RegexI>: Sync,
BoxRaw<Pool<Cache, Box<dyn Fn() -> Cache + UnwindSafe + RefUnwindSafe + Send + Sync>>>: Sync,
Arc<Pool<PatternSet, Box<dyn Fn() -> PatternSet + UnwindSafe + RefUnwindSafe + Send + Sync>>>: Sync,
impl Unpin for NamespaceRegistrywhere
*const u8 is !null: Unpin,
Arc<dyn AcAutomaton>: Unpin,
Arc<RegexI>: Unpin,
Box<Pool<Cache, Box<dyn Fn() -> Cache + UnwindSafe + RefUnwindSafe + Send + Sync>>>: Unpin,
Arc<Pool<PatternSet, Box<dyn Fn() -> PatternSet + UnwindSafe + RefUnwindSafe + Send + Sync>>>: Unpin,
impl UnsafeUnpin for NamespaceRegistrywhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<CompiledRule>: UnsafeUnpin,
impl UnwindSafe for NamespaceRegistrywhere
RawVecInner: UnwindSafe,
HashMap<Vec<u8>, Vec<usize>, BuildHasherDefault<Hasher>>: UnwindSafe,
Arc<dyn AcAutomaton>: UnwindSafe,
HashMap<Vec<u8>, Vec<(usize, Regex)>, BuildHasherDefault<Hasher>>: UnwindSafe,
Arc<RegexI>: UnwindSafe,
BoxRaw<Pool<Cache, Box<dyn Fn() -> Cache + UnwindSafe + RefUnwindSafe + Send + Sync>>>: UnwindSafe,
Arc<Pool<PatternSet, Box<dyn Fn() -> PatternSet + UnwindSafe + RefUnwindSafe + Send + Sync>>>: UnwindSafe,
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