pub struct Catalog<'a> { /* private fields */ }Implementations§
Source§impl<'a> Catalog<'a>
impl<'a> Catalog<'a>
pub fn new(api: &'a dyn KrApi) -> Self
Sourcepub async fn search_products(
&self,
store_id: &str,
query: &str,
limit: Option<u32>,
) -> Result<ProductSearchResponse, ApiError>
pub async fn search_products( &self, store_id: &str, query: &str, limit: Option<u32>, ) -> Result<ProductSearchResponse, ApiError>
Search products at a store.
The term goes in the path, percent-encoded, with paging and store in the query string. Results are store-scoped: price and availability differ per store, so the same term at a different store is a genuinely different answer.
Sourcepub async fn search_stores(
&self,
query: &str,
limit: Option<u32>,
) -> Result<StoreSearchResponse, ApiError>
pub async fn search_stores( &self, query: &str, limit: Option<u32>, ) -> Result<StoreSearchResponse, ApiError>
Search stores by name or place.
Unlike product search, the term goes in a JSON body.
Auto Trait Implementations§
impl<'a> Freeze for Catalog<'a>
impl<'a> !RefUnwindSafe for Catalog<'a>
impl<'a> Send for Catalog<'a>
impl<'a> Sync for Catalog<'a>
impl<'a> Unpin for Catalog<'a>
impl<'a> UnsafeUnpin for Catalog<'a>
impl<'a> !UnwindSafe for Catalog<'a>
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