Skip to main content

StreamSearch

Trait StreamSearch 

Source
pub trait StreamSearch: Send + Sync {
    // Required method
    fn stream_search(
        &self,
        search: Search,
        max_items: Option<usize>,
        context: bool,
        self_href: Option<String>,
    ) -> impl Future<Output = Result<StreamedSearch>> + Send;

    // Provided method
    fn write_search<W: Write>(
        &self,
        search: Search,
        max_items: Option<usize>,
        context: bool,
        self_href: Option<String>,
        writer: W,
        pretty: bool,
    ) -> impl Future<Output = Result<u64>> { ... }
}
Expand description

A backend that streams a search response as items plus a finished ItemCollection. How it produces and paginates them is the implementation’s concern.

context requests numberMatched (the STAC context extension). self_href is the URL this response is served at; pagination links are absolute against it, or relative when None.

Required Methods§

Begins a streamed search, capped at max_items total items.

Provided Methods§

Drives this backend’s streamed search into writer as one flat-memory JSON ItemCollection, returning the number of items written.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§