pub struct KnowledgeBaseRepository { /* private fields */ }Expand description
Filesystem-backed access point for one canonical knowledge-base repository.
Implementations§
Source§impl KnowledgeBaseRepository
impl KnowledgeBaseRepository
pub fn new(root: impl Into<PathBuf>) -> Self
pub fn with_validators( root: impl Into<PathBuf>, validators: impl IntoIterator<Item = Arc<dyn KnowledgeBaseValidator>>, ) -> Self
pub fn root(&self) -> &Path
Sourcepub fn validate(&self) -> Vec<Diagnostic>
pub fn validate(&self) -> Vec<Diagnostic>
Validates the current repository with generic and configured validators.
pub fn read(&self) -> ReadRepository<'_>
pub fn write(&self) -> WriteRepository<'_>
Trait Implementations§
Source§impl Clone for KnowledgeBaseRepository
impl Clone for KnowledgeBaseRepository
Source§fn clone(&self) -> KnowledgeBaseRepository
fn clone(&self) -> KnowledgeBaseRepository
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for KnowledgeBaseRepository
impl !UnwindSafe for KnowledgeBaseRepository
impl Freeze for KnowledgeBaseRepository
impl Send for KnowledgeBaseRepository
impl Sync for KnowledgeBaseRepository
impl Unpin for KnowledgeBaseRepository
impl UnsafeUnpin for KnowledgeBaseRepository
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