pub struct SyncHrefClient { /* private fields */ }Expand description
A thread-safe wrapper around HrefClient that implements
SearchClient and CollectionSearchClient.
Use this when you need the async client traits. For ArrowSearchClient,
use HrefClient directly.
§Examples
use stac::api::SearchClient;
use stac_duckdb::SyncHrefClient;
let client = SyncHrefClient::new("data/100-sentinel-2-items.parquet").unwrap();
let item_collection = client.search(Default::default()).await.unwrap();Implementations§
Source§impl SyncHrefClient
impl SyncHrefClient
Sourcepub fn new(href: impl ToString) -> Result<SyncHrefClient>
pub fn new(href: impl ToString) -> Result<SyncHrefClient>
Creates a new SyncHrefClient for the given href.
Sourcepub fn from_client(client: Client, href: impl ToString) -> SyncHrefClient
pub fn from_client(client: Client, href: impl ToString) -> SyncHrefClient
Creates a new SyncHrefClient from an existing Client and href.
Trait Implementations§
Source§impl CollectionSearchClient for SyncHrefClient
impl CollectionSearchClient for SyncHrefClient
Source§async fn collections(&self) -> Result<Vec<Collection>, Error>
async fn collections(&self) -> Result<Vec<Collection>, Error>
Returns all collections.
Source§impl Debug for SyncHrefClient
impl Debug for SyncHrefClient
Source§impl SearchClient for SyncHrefClient
impl SearchClient for SyncHrefClient
Source§async fn search(&self, search: Search) -> Result<ItemCollection, Error>
async fn search(&self, search: Search) -> Result<ItemCollection, Error>
Searches for STAC items matching the given parameters.
Auto Trait Implementations§
impl !Freeze for SyncHrefClient
impl RefUnwindSafe for SyncHrefClient
impl Send for SyncHrefClient
impl Sync for SyncHrefClient
impl Unpin for SyncHrefClient
impl UnsafeUnpin for SyncHrefClient
impl UnwindSafe for SyncHrefClient
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