Expand description
What a service asks of Grab: the per-account client (GrabClient:
search, menu, cart, quote, order, tracking, the refresh and the liveness
check), the login driver (LoginDriver) and the backend that makes
both (GrabBackend: grabcli’s library, or the fake). The session
itself is opaque here (grabcli’s serde Session as JSON), read and
written only through a SessionSlot: wherever the service keeps it.
Structs§
- Cart
- The cart (one merchant at a time).
- Fee
- A fee of a quote.
- Health
- What a refresh or a liveness check found.
- Line
- A line of the cart or a quote.
- Menu
- A merchant’s menu.
- Menu
Item - One menu item.
- Merchant
- A restaurant from a search.
- Placed
- A placed order.
- Quote
- A priced checkout of the cart: what an order would cost now.
- Tracked
- An order being delivered (or just delivered).
Enums§
- CartOp
- A cart change.
- Grab
Error - Why a Grab call failed.
- Op
- One call a service’s caller (a tool, a command) asks for, checked.
- Step
- Where a login is. Its
Debugnever shows a done step’s session.
Traits§
- Grab
Backend - Makes the clients and the login drivers.
- Grab
Client - One account’s Grab, over its
SessionSlot. - Login
Driver - One login in a fresh isolated browser context, driven from its own thread. The phone and the code are passed in and never kept by the caller.
- Session
Slot - An account’s session, wherever the service keeps it (sealed, ideally): read and written only through this (the client’s refreshes save here).
Functions§
- money
₱1,234.50forminorcentavos ofcurrency(PHP’s sign; others by code).
Type Aliases§
- Grab
Result - A Grab call’s result.