pub trait KnowledgeStore: Send + Sync {
// Required methods
fn id(&self) -> KnowledgeStoreId;
fn save<'life0, 'async_trait>(
&'life0 self,
request: KnowledgeSaveRequest,
) -> Pin<Box<dyn Future<Output = Result<KnowledgeDocument>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 KnowledgeDocId,
) -> Pin<Box<dyn Future<Output = Result<Option<KnowledgeDocument>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn get_revision<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 KnowledgeDocId,
revision: u32,
) -> Pin<Box<dyn Future<Output = Result<Option<KnowledgeDocument>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn list<'life0, 'async_trait>(
&'life0 self,
query: KnowledgeListQuery,
) -> Pin<Box<dyn Future<Output = Result<Vec<KnowledgeDocSummary>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn search<'life0, 'async_trait>(
&'life0 self,
query: KnowledgeQuery,
) -> Pin<Box<dyn Future<Output = Result<Vec<KnowledgeSearchResult>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn update<'life0, 'async_trait>(
&'life0 self,
request: KnowledgeUpdateRequest,
) -> Pin<Box<dyn Future<Output = Result<KnowledgeDocument>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn archive<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 KnowledgeDocId,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn set_link<'life0, 'async_trait>(
&'life0 self,
request: KnowledgeLinkRequest,
) -> Pin<Box<dyn Future<Output = Result<KnowledgeDocument>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn revisions<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 KnowledgeDocId,
) -> Pin<Box<dyn Future<Output = Result<Vec<KnowledgeRevisionInfo>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}Required Methods§
fn id(&self) -> KnowledgeStoreId
fn save<'life0, 'async_trait>(
&'life0 self,
request: KnowledgeSaveRequest,
) -> Pin<Box<dyn Future<Output = Result<KnowledgeDocument>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 KnowledgeDocId,
) -> Pin<Box<dyn Future<Output = Result<Option<KnowledgeDocument>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_revision<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 KnowledgeDocId,
revision: u32,
) -> Pin<Box<dyn Future<Output = Result<Option<KnowledgeDocument>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn list<'life0, 'async_trait>(
&'life0 self,
query: KnowledgeListQuery,
) -> Pin<Box<dyn Future<Output = Result<Vec<KnowledgeDocSummary>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn search<'life0, 'async_trait>(
&'life0 self,
query: KnowledgeQuery,
) -> Pin<Box<dyn Future<Output = Result<Vec<KnowledgeSearchResult>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn update<'life0, 'async_trait>(
&'life0 self,
request: KnowledgeUpdateRequest,
) -> Pin<Box<dyn Future<Output = Result<KnowledgeDocument>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Sourcefn archive<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 KnowledgeDocId,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn archive<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 KnowledgeDocId,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Soft-delete: the document leaves default lists but stays readable by id.
fn set_link<'life0, 'async_trait>(
&'life0 self,
request: KnowledgeLinkRequest,
) -> Pin<Box<dyn Future<Output = Result<KnowledgeDocument>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn revisions<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 KnowledgeDocId,
) -> Pin<Box<dyn Future<Output = Result<Vec<KnowledgeRevisionInfo>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".