pub struct Client<C>(_)
where
C: GenericClient;
Expand description
A pgstac client.
Not every pgstac function is provided, and some names are changed to match Rust conventions.
Implementations§
source§impl<C: GenericClient> Client<C>
impl<C: GenericClient> Client<C>
sourcepub fn into_inner(self) -> C
pub fn into_inner(self) -> C
Returns this client’s inner client.
sourcepub async fn setting(&self, setting: &str) -> Result<String>
pub async fn setting(&self, setting: &str) -> Result<String>
Returns the value of a pgstac setting.
sourcepub async fn collections(&self) -> Result<Vec<Collection>>
pub async fn collections(&self) -> Result<Vec<Collection>>
Fetches all collections.
sourcepub async fn collection(&self, id: &str) -> Result<Option<Collection>>
pub async fn collection(&self, id: &str) -> Result<Option<Collection>>
Fetches a collection by id.
sourcepub async fn add_collection(&self, collection: Collection) -> Result<()>
pub async fn add_collection(&self, collection: Collection) -> Result<()>
Adds a collection.
sourcepub async fn upsert_collection(&self, collection: Collection) -> Result<()>
pub async fn upsert_collection(&self, collection: Collection) -> Result<()>
Adds or updates a collection.
sourcepub async fn update_collection(&self, collection: Collection) -> Result<()>
pub async fn update_collection(&self, collection: Collection) -> Result<()>
Updates a collection.
sourcepub async fn delete_collection(&self, id: &str) -> Result<()>
pub async fn delete_collection(&self, id: &str) -> Result<()>
Deletes a collection.
sourcepub async fn update_item(&self, item: Item) -> Result<()>
pub async fn update_item(&self, item: Item) -> Result<()>
Updates an item.
sourcepub async fn upsert_item(&self, item: Item) -> Result<()>
pub async fn upsert_item(&self, item: Item) -> Result<()>
Upserts an item.
sourcepub async fn upsert_items(&self, items: &[Item]) -> Result<()>
pub async fn upsert_items(&self, items: &[Item]) -> Result<()>
Upserts items.