pub struct Client { /* private fields */ }
Expand description
A client for making DuckDB requests for STAC objects.
Implementations§
Source§impl Client
impl Client
Sourcepub fn new() -> Result<Client>
pub fn new() -> Result<Client>
Creates a new client with no data sources.
§Examples
use stac_duckdb::Client;
let client = Client::new().unwrap();
Sourcepub fn collections(&self, href: &str) -> Result<Vec<Collection>>
pub fn collections(&self, href: &str) -> Result<Vec<Collection>>
Returns one or more stac::Collection from the items in the stac-geoparquet file.
Sourcepub fn search(
&self,
href: &str,
search: impl Into<Search>,
) -> Result<ItemCollection>
pub fn search( &self, href: &str, search: impl Into<Search>, ) -> Result<ItemCollection>
Searches this client, returning a stac::ItemCollection.
Sourcepub fn search_to_json(
&self,
href: &str,
search: impl Into<Search>,
) -> Result<ItemCollection>
pub fn search_to_json( &self, href: &str, search: impl Into<Search>, ) -> Result<ItemCollection>
Searches this client, returning a stac_api::ItemCollection.
Use this method if you want JSON that might not be valid STAC items, e.g. if you’ve excluded required fields from the response.
Sourcepub fn search_to_arrow(
&self,
href: &str,
search: impl Into<Search>,
) -> Result<Vec<RecordBatch>>
pub fn search_to_arrow( &self, href: &str, search: impl Into<Search>, ) -> Result<Vec<RecordBatch>>
Searches this client, returning a vector of all matched record batches.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Client
impl !RefUnwindSafe for Client
impl Send for Client
impl !Sync for Client
impl Unpin for Client
impl UnwindSafe for Client
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more