pub struct KnowledgeStore { /* private fields */ }Implementations§
Source§impl KnowledgeStore
impl KnowledgeStore
pub fn new() -> Self
pub fn set_root(&mut self, root: PathBuf)
pub fn root(&self) -> Option<&PathBuf>
pub fn set_git_branch(&mut self, branch: Option<String>)
pub fn git_branch(&self) -> Option<&str>
pub fn set_enabled_providers(&mut self, providers: Vec<String>)
pub fn enabled_providers(&self) -> &[String]
pub fn upsert_object(&mut self, object: StoredObject)
pub fn add_entity(&mut self, entity: Entity)
pub fn add_relationship(&mut self, rel: Relationship)
pub fn get_object(&self, id: &ObjectId) -> Option<&StoredObject>
pub fn get_object_by_path(&self, path: &str) -> Option<&StoredObject>
pub fn objects(&self) -> impl Iterator<Item = &StoredObject>
pub fn objects_by_status( &self, status: UnderstandingStatus, ) -> Vec<&StoredObject>
pub fn get_entity(&self, id: &EntityId) -> Option<&Entity>
pub fn entities(&self) -> impl Iterator<Item = &Entity>
pub fn relationships(&self) -> impl Iterator<Item = &Relationship>
pub fn find_entities_by_name(&self, name: &str) -> Vec<&Entity>
pub fn find(&self, text: &str) -> FindResults
pub fn neighborhood( &self, entity_id: &EntityId, depth: usize, ) -> GraphNeighborhood
pub fn inventory(&self) -> InventoryCounts
Trait Implementations§
Source§impl Debug for KnowledgeStore
impl Debug for KnowledgeStore
Source§impl Default for KnowledgeStore
impl Default for KnowledgeStore
Source§fn default() -> KnowledgeStore
fn default() -> KnowledgeStore
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for KnowledgeStore
impl RefUnwindSafe for KnowledgeStore
impl Send for KnowledgeStore
impl Sync for KnowledgeStore
impl Unpin for KnowledgeStore
impl UnsafeUnpin for KnowledgeStore
impl UnwindSafe for KnowledgeStore
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more