pub trait KnowledgeStore: Send + Sync {
// Required methods
fn search<'life0, 'async_trait>(
&'life0 self,
params: SearchParams,
) -> Pin<Box<dyn Future<Output = Result<SearchResults>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_document<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<DocumentContext>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn get_references<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
entity: &'life1 str,
ref_type: Option<&'life2 str>,
limit: u32,
) -> Pin<Box<dyn Future<Output = Result<Vec<Reference>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn lookup_bip<'life0, 'async_trait>(
&'life0 self,
number: u32,
) -> Pin<Box<dyn Future<Output = Result<Option<DocumentContext>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn lookup_bolt<'life0, 'async_trait>(
&'life0 self,
number: u32,
) -> Pin<Box<dyn Future<Output = Result<Option<DocumentContext>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn lookup_blip<'life0, 'async_trait>(
&'life0 self,
number: u32,
) -> Pin<Box<dyn Future<Output = Result<Option<DocumentContext>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn lookup_lud<'life0, 'async_trait>(
&'life0 self,
number: u32,
) -> Pin<Box<dyn Future<Output = Result<Option<DocumentContext>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn lookup_nut<'life0, 'async_trait>(
&'life0 self,
number: u32,
) -> Pin<Box<dyn Future<Output = Result<Option<DocumentContext>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn timeline<'life0, 'life1, 'async_trait>(
&'life0 self,
concept: &'life1 str,
after: Option<DateTime<Utc>>,
before: Option<DateTime<Utc>>,
) -> Pin<Box<dyn Future<Output = Result<Timeline>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn find_commit<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
query: &'life1 str,
repo: Option<&'life2 str>,
) -> Pin<Box<dyn Future<Output = Result<Vec<CommitContext>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
}Expand description
Trait for querying the Bitcoin Knowledge Base.
Implemented by LocalSqliteStore (direct DB queries) and
RemoteApiStore (HTTP client to the BKB service).
Required Methods§
Sourcefn search<'life0, 'async_trait>(
&'life0 self,
params: SearchParams,
) -> Pin<Box<dyn Future<Output = Result<SearchResults>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn search<'life0, 'async_trait>(
&'life0 self,
params: SearchParams,
) -> Pin<Box<dyn Future<Output = Result<SearchResults>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Full-text (and optionally semantic) search across all documents.
Sourcefn get_document<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<DocumentContext>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_document<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<DocumentContext>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Get a single document by ID with full content, references, and concepts.
Sourcefn get_references<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
entity: &'life1 str,
ref_type: Option<&'life2 str>,
limit: u32,
) -> Pin<Box<dyn Future<Output = Result<Vec<Reference>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn get_references<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
entity: &'life1 str,
ref_type: Option<&'life2 str>,
limit: u32,
) -> Pin<Box<dyn Future<Output = Result<Vec<Reference>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Find all documents referencing a given entity (BIP, BOLT, issue, commit, or concept).
Sourcefn lookup_bip<'life0, 'async_trait>(
&'life0 self,
number: u32,
) -> Pin<Box<dyn Future<Output = Result<Option<DocumentContext>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn lookup_bip<'life0, 'async_trait>(
&'life0 self,
number: u32,
) -> Pin<Box<dyn Future<Output = Result<Option<DocumentContext>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get comprehensive context for a BIP: spec text, all referencing documents, and incoming refs.
Sourcefn lookup_bolt<'life0, 'async_trait>(
&'life0 self,
number: u32,
) -> Pin<Box<dyn Future<Output = Result<Option<DocumentContext>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn lookup_bolt<'life0, 'async_trait>(
&'life0 self,
number: u32,
) -> Pin<Box<dyn Future<Output = Result<Option<DocumentContext>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get comprehensive context for a BOLT: spec text, all referencing documents, and incoming refs.
Sourcefn lookup_blip<'life0, 'async_trait>(
&'life0 self,
number: u32,
) -> Pin<Box<dyn Future<Output = Result<Option<DocumentContext>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn lookup_blip<'life0, 'async_trait>(
&'life0 self,
number: u32,
) -> Pin<Box<dyn Future<Output = Result<Option<DocumentContext>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get comprehensive context for a bLIP: spec text, all referencing documents, and incoming refs.
Sourcefn lookup_lud<'life0, 'async_trait>(
&'life0 self,
number: u32,
) -> Pin<Box<dyn Future<Output = Result<Option<DocumentContext>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn lookup_lud<'life0, 'async_trait>(
&'life0 self,
number: u32,
) -> Pin<Box<dyn Future<Output = Result<Option<DocumentContext>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get comprehensive context for a LUD: spec text, all referencing documents, and incoming refs.
Sourcefn lookup_nut<'life0, 'async_trait>(
&'life0 self,
number: u32,
) -> Pin<Box<dyn Future<Output = Result<Option<DocumentContext>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn lookup_nut<'life0, 'async_trait>(
&'life0 self,
number: u32,
) -> Pin<Box<dyn Future<Output = Result<Option<DocumentContext>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get comprehensive context for a NUT: spec text, all referencing documents, and incoming refs.
Sourcefn timeline<'life0, 'life1, 'async_trait>(
&'life0 self,
concept: &'life1 str,
after: Option<DateTime<Utc>>,
before: Option<DateTime<Utc>>,
) -> Pin<Box<dyn Future<Output = Result<Timeline>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn timeline<'life0, 'life1, 'async_trait>(
&'life0 self,
concept: &'life1 str,
after: Option<DateTime<Utc>>,
before: Option<DateTime<Utc>>,
) -> Pin<Box<dyn Future<Output = Result<Timeline>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Chronological timeline of a concept across all sources.
Sourcefn find_commit<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
query: &'life1 str,
repo: Option<&'life2 str>,
) -> Pin<Box<dyn Future<Output = Result<Vec<CommitContext>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn find_commit<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
query: &'life1 str,
repo: Option<&'life2 str>,
) -> Pin<Box<dyn Future<Output = Result<Vec<CommitContext>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Find commits matching a query, with associated PR and discussion context.