pub trait RemoteSource:
Send
+ Sync
+ 'static {
// Required methods
fn id(&self) -> &str;
fn label(&self) -> String;
fn search(
&self,
query: &QuerySpec,
cancel: &Cancel,
page: &mut dyn FnMut(Vec<Item>),
) -> Result<(), RemoteError>;
// Provided methods
fn origin(&self) -> Source { ... }
fn accepts(&self, query: &QuerySpec) -> bool { ... }
fn warm(&self) { ... }
}Expand description
A source of items that are not local: a streaming catalogue, a store, a collaborator’s library. It keeps its own index; nothing of it is downloaded to be searched.
Required Methods§
Provided Methods§
Sourcefn origin(&self) -> Source
fn origin(&self) -> Source
Where its answers come from, as its section’s placeholder names it while one is on the way: a host serving the catalogue by default; a collaborator’s library is a peer.