pub struct KnowledgeGraph { /* private fields */ }Implementations§
Source§impl KnowledgeGraph
impl KnowledgeGraph
pub fn new(db_path: &Path) -> Result<Self>
pub fn add_triple( &self, subject: &str, predicate: &str, object: &str, confidence: f64, source_closet: Option<&str>, source_file: Option<&str>, ) -> Result<String>
pub fn invalidate_triple( &self, subject: &str, predicate: &str, object: &str, ) -> Result<usize>
pub fn query_entity(&self, entity: &str, direction: &str) -> Result<Vec<Triple>>
pub fn timeline(&self, entity: &str, limit: usize) -> Result<Vec<Triple>>
pub fn all_triples(&self, limit: usize) -> Result<Vec<Triple>>
pub fn stats(&self) -> Result<Value>
pub fn list_entities(&self, limit: usize) -> Result<Vec<Entity>>
Auto Trait Implementations§
impl Freeze for KnowledgeGraph
impl RefUnwindSafe for KnowledgeGraph
impl Send for KnowledgeGraph
impl Sync for KnowledgeGraph
impl Unpin for KnowledgeGraph
impl UnsafeUnpin for KnowledgeGraph
impl UnwindSafe for KnowledgeGraph
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