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§
Provided Methods§
Sourcefn 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>>
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>>
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".