pub trait GrabClient: Send + Sync {
// Required methods
fn search<'life0, 'life1, 'async_trait>(
&'life0 self,
query: &'life1 str,
limit: usize,
) -> Pin<Box<dyn Future<Output = GrabResult<Vec<Merchant>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn menu<'life0, 'life1, 'async_trait>(
&'life0 self,
merchant_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = GrabResult<Menu>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn cart<'life0, 'life1, 'async_trait>(
&'life0 self,
op: &'life1 CartOp,
) -> Pin<Box<dyn Future<Output = GrabResult<Cart>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn quote<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = GrabResult<Quote>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn place_order<'life0, 'life1, 'async_trait>(
&'life0 self,
quote_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = GrabResult<Placed>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn track<'life0, 'life1, 'async_trait>(
&'life0 self,
order_id: Option<&'life1 str>,
) -> Pin<Box<dyn Future<Output = GrabResult<Vec<Tracked>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn refresh<'life0, 'async_trait>(
&'life0 self,
liveness: bool,
) -> Pin<Box<dyn Future<Output = GrabResult<Health>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
One account’s Grab, over its SessionSlot.
Required Methods§
Sourcefn search<'life0, 'life1, 'async_trait>(
&'life0 self,
query: &'life1 str,
limit: usize,
) -> Pin<Box<dyn Future<Output = GrabResult<Vec<Merchant>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn search<'life0, 'life1, 'async_trait>(
&'life0 self,
query: &'life1 str,
limit: usize,
) -> Pin<Box<dyn Future<Output = GrabResult<Vec<Merchant>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Restaurants matching query (at most limit).
A merchant’s menu.
Sourcefn cart<'life0, 'life1, 'async_trait>(
&'life0 self,
op: &'life1 CartOp,
) -> Pin<Box<dyn Future<Output = GrabResult<Cart>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn cart<'life0, 'life1, 'async_trait>(
&'life0 self,
op: &'life1 CartOp,
) -> Pin<Box<dyn Future<Output = GrabResult<Cart>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Change (or show) the cart; the cart after.
Sourcefn quote<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = GrabResult<Quote>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn quote<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = GrabResult<Quote>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
The cart priced now, with the best voucher that applies.
Sourcefn place_order<'life0, 'life1, 'async_trait>(
&'life0 self,
quote_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = GrabResult<Placed>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn place_order<'life0, 'life1, 'async_trait>(
&'life0 self,
quote_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = GrabResult<Placed>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Place the cart’s order against quote_id (the caller re-quoted
and matched it). Never retried.
Sourcefn track<'life0, 'life1, 'async_trait>(
&'life0 self,
order_id: Option<&'life1 str>,
) -> Pin<Box<dyn Future<Output = GrabResult<Vec<Tracked>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn track<'life0, 'life1, 'async_trait>(
&'life0 self,
order_id: Option<&'life1 str>,
) -> Pin<Box<dyn Future<Output = GrabResult<Vec<Tracked>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
One order’s tracking, or the ongoing orders’.
Sourcefn refresh<'life0, 'async_trait>(
&'life0 self,
liveness: bool,
) -> Pin<Box<dyn Future<Output = GrabResult<Health>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn refresh<'life0, 'async_trait>(
&'life0 self,
liveness: bool,
) -> Pin<Box<dyn Future<Output = GrabResult<Health>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
A silent SSO refresh when the web session is near its end (saved
through the slot), and with liveness a check that the account
answers (its name).
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".