pub trait KnowledgeService:
Send
+ Sync
+ 'static {
type SearchStreamStream: Stream<Item = Result<SearchResult, Status>> + Send + 'static;
// Required methods
fn add_entry<'life0, 'async_trait>(
&'life0 self,
request: Request<AddEntryRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<AddEntryResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn add_entries<'life0, 'async_trait>(
&'life0 self,
request: Request<AddEntriesRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<AddEntriesResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_entry<'life0, 'async_trait>(
&'life0 self,
request: Request<GetEntryRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<GetEntryResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn update_entry<'life0, 'async_trait>(
&'life0 self,
request: Request<UpdateEntryRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<UpdateEntryResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn delete_entry<'life0, 'async_trait>(
&'life0 self,
request: Request<DeleteEntryRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<DeleteEntryResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn search<'life0, 'async_trait>(
&'life0 self,
request: Request<SearchRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<SearchResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn search_stream<'life0, 'async_trait>(
&'life0 self,
request: Request<SearchRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<Self::SearchStreamStream>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn record_feedback<'life0, 'async_trait>(
&'life0 self,
request: Request<FeedbackRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<FeedbackResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_related<'life0, 'async_trait>(
&'life0 self,
request: Request<GetRelatedRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<GetRelatedResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn link_entries<'life0, 'async_trait>(
&'life0 self,
request: Request<LinkEntriesRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<LinkEntriesResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_stats<'life0, 'async_trait>(
&'life0 self,
request: Request<GetStatsRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<GetStatsResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn health<'life0, 'async_trait>(
&'life0 self,
request: Request<HealthRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<HealthResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
Generated trait containing gRPC methods that should be implemented for use with KnowledgeServiceServer.
Required Associated Types§
Sourcetype SearchStreamStream: Stream<Item = Result<SearchResult, Status>> + Send + 'static
type SearchStreamStream: Stream<Item = Result<SearchResult, Status>> + Send + 'static
Server streaming response type for the SearchStream method.
Required Methods§
Sourcefn add_entry<'life0, 'async_trait>(
&'life0 self,
request: Request<AddEntryRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<AddEntryResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn add_entry<'life0, 'async_trait>(
&'life0 self,
request: Request<AddEntryRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<AddEntryResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Add a new knowledge entry
Sourcefn add_entries<'life0, 'async_trait>(
&'life0 self,
request: Request<AddEntriesRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<AddEntriesResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn add_entries<'life0, 'async_trait>(
&'life0 self,
request: Request<AddEntriesRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<AddEntriesResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Add multiple entries in batch
Sourcefn get_entry<'life0, 'async_trait>(
&'life0 self,
request: Request<GetEntryRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<GetEntryResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_entry<'life0, 'async_trait>(
&'life0 self,
request: Request<GetEntryRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<GetEntryResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get an entry by ID
Sourcefn update_entry<'life0, 'async_trait>(
&'life0 self,
request: Request<UpdateEntryRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<UpdateEntryResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn update_entry<'life0, 'async_trait>(
&'life0 self,
request: Request<UpdateEntryRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<UpdateEntryResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Update an existing entry
Sourcefn delete_entry<'life0, 'async_trait>(
&'life0 self,
request: Request<DeleteEntryRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<DeleteEntryResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn delete_entry<'life0, 'async_trait>(
&'life0 self,
request: Request<DeleteEntryRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<DeleteEntryResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Delete an entry
Sourcefn search<'life0, 'async_trait>(
&'life0 self,
request: Request<SearchRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<SearchResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn search<'life0, 'async_trait>(
&'life0 self,
request: Request<SearchRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<SearchResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Search for similar entries
Sourcefn search_stream<'life0, 'async_trait>(
&'life0 self,
request: Request<SearchRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<Self::SearchStreamStream>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn search_stream<'life0, 'async_trait>(
&'life0 self,
request: Request<SearchRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<Self::SearchStreamStream>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Stream search results
Sourcefn record_feedback<'life0, 'async_trait>(
&'life0 self,
request: Request<FeedbackRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<FeedbackResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn record_feedback<'life0, 'async_trait>(
&'life0 self,
request: Request<FeedbackRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<FeedbackResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Record user feedback on a result
Get related entries
Sourcefn link_entries<'life0, 'async_trait>(
&'life0 self,
request: Request<LinkEntriesRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<LinkEntriesResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn link_entries<'life0, 'async_trait>(
&'life0 self,
request: Request<LinkEntriesRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<LinkEntriesResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Link two entries as related