Skip to main content

KnowledgeGrammar

Struct KnowledgeGrammar 

Source
pub struct KnowledgeGrammar<'a>(/* private fields */);
Expand description

KnowledgeGrammar provides Layer 6 (Information) composition operations.

Implementations§

Source§

impl<'a> KnowledgeGrammar<'a>

Source

pub fn new(store: &'a mut InMemoryStore) -> Self

Source

pub fn claim( &mut self, source: ActorId, claim: &str, causes: Vec<EventId>, conv_id: ConversationId, signer: &dyn Signer, ) -> Result<Event>

Source

pub fn categorize( &mut self, source: ActorId, target: EventId, taxonomy: &str, conv_id: ConversationId, signer: &dyn Signer, ) -> Result<Event>

Source

pub fn abstract_merge( &mut self, source: ActorId, generalization: &str, instances: Vec<EventId>, conv_id: ConversationId, signer: &dyn Signer, ) -> Result<Event>

Source

pub fn encode( &mut self, source: ActorId, encoding: &str, original: EventId, conv_id: ConversationId, signer: &dyn Signer, ) -> Result<Event>

Source

pub fn infer( &mut self, source: ActorId, conclusion: &str, premise: EventId, conv_id: ConversationId, signer: &dyn Signer, ) -> Result<Event>

Source

pub fn remember( &mut self, source: ActorId, knowledge: &str, causes: Vec<EventId>, conv_id: ConversationId, signer: &dyn Signer, ) -> Result<Event>

Source

pub fn challenge( &mut self, source: ActorId, counter_evidence: &str, claim_id: EventId, conv_id: ConversationId, signer: &dyn Signer, ) -> Result<Event>

Source

pub fn detect_bias( &mut self, source: ActorId, target: EventId, bias: &str, conv_id: ConversationId, signer: &dyn Signer, ) -> Result<Event>

Source

pub fn correct( &mut self, source: ActorId, correction: &str, original: EventId, conv_id: ConversationId, signer: &dyn Signer, ) -> Result<Event>

Source

pub fn trace( &mut self, source: ActorId, target: EventId, provenance: &str, conv_id: ConversationId, signer: &dyn Signer, ) -> Result<Event>

Source

pub fn recall( &mut self, source: ActorId, query: &str, causes: Vec<EventId>, conv_id: ConversationId, signer: &dyn Signer, ) -> Result<Event>

Source

pub fn learn( &mut self, source: ActorId, learning: &str, causes: Vec<EventId>, conv_id: ConversationId, signer: &dyn Signer, ) -> Result<Event>

Source

pub fn retract( &mut self, source: ActorId, claim_id: EventId, reason: &str, conv_id: ConversationId, signer: &dyn Signer, ) -> Result<Event>

Source

pub fn fact_check( &mut self, checker: ActorId, claim_id: EventId, provenance: &str, bias_analysis: &str, verdict: &str, conv_id: ConversationId, signer: &dyn Signer, ) -> Result<FactCheckResult>

Source

pub fn verify( &mut self, source: ActorId, claim_str: &str, provenance: &str, corroboration: &str, causes: Vec<EventId>, conv_id: ConversationId, signer: &dyn Signer, ) -> Result<VerifyResult>

Source

pub fn survey( &mut self, source: ActorId, queries: &[&str], generalization: &str, synthesis: &str, causes: Vec<EventId>, conv_id: ConversationId, signer: &dyn Signer, ) -> Result<SurveyResult>

Source

pub fn knowledge_base( &mut self, source: ActorId, claims: &[&str], taxonomies: &[&str], memory_label: &str, causes: Vec<EventId>, conv_id: ConversationId, signer: &dyn Signer, ) -> Result<KnowledgeBaseResult>

Source

pub fn transfer( &mut self, source: ActorId, query: &str, encoding: &str, learning: &str, causes: Vec<EventId>, conv_id: ConversationId, signer: &dyn Signer, ) -> Result<TransferResult>

Auto Trait Implementations§

§

impl<'a> Freeze for KnowledgeGrammar<'a>

§

impl<'a> RefUnwindSafe for KnowledgeGrammar<'a>

§

impl<'a> Send for KnowledgeGrammar<'a>

§

impl<'a> Sync for KnowledgeGrammar<'a>

§

impl<'a> Unpin for KnowledgeGrammar<'a>

§

impl<'a> UnsafeUnpin for KnowledgeGrammar<'a>

§

impl<'a> !UnwindSafe for KnowledgeGrammar<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.