Skip to main content

SearchProvider

Trait SearchProvider 

Source
pub trait SearchProvider:
    Debug
    + Send
    + Sync {
    // Required methods
    fn destination(&self) -> &str;
    fn search(
        &self,
        request: SearchRequest,
        cancellation: CancellationScope,
    ) -> SearchFuture<'_>;
}
Expand description

Object-safe client web-search backend port.

Required Methods§

Source

fn destination(&self) -> &str

Returns the configured disclosure destination used for policy resources.

Source

fn search( &self, request: SearchRequest, cancellation: CancellationScope, ) -> SearchFuture<'_>

Executes one bounded request with cooperative cancellation.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§