Skip to main content
Blocking (ureq), serde models, no async runtime required. Generated by the same emitter as the Python and TypeScript packages.

The smallest complete solve

Errors

Every failure is an EddyError { code, message, status, retry_after } — the API’s error code and the HTTP status (0 for a client-side TRANSPORT / TIMEOUT / DECODE); retry_after the seconds a 429 / 503 asked for once the retries are spent (a 429 is retried only when it carries retry-after).

Async jobs

A 202 is followed through poll to the result by default; Eddy::new(..).wait_jobs(false) returns the handle instead (its job_id in the model’s extra), then eddy.wait_for_job(id), eddy.job_events(id) (the server-sent events, collected) or eddy.job_events_iter(id) (an iterator handing each event out as the engine sends it — for ev in eddy.job_events_iter(&id)? { let (event, status) = ev?; }). A webhook: Some(WebhookSpec { url, secret }) on the body has the engine POST the finished job record, signed (x-eddy-signature: blake3=<hex>); eddy.usage() is the caller’s own meter. The conventions for one key per tenant are on the tenancy page.

Blobs and fields

eddy.blob(id) fetches bytes through a BlobCache (EDDY_CACHE_DIR, default ~/.cache/eddy-solve/blobs; .cache(None) disables it — a blob id names its bytes forever). eddy.field(&result_json, Some("displacement")) decodes an SSFLD1 blob into Field { components, count, values }; eddy.fields(&result_json) decodes them all.

Reference

One method per operation, named snake_case of the operation id — the API reference names each. Path parameters are &str, a JSON body is &Model (every field Option, undocumented keys in extra), query parameters Option<T>; the reply is the documented model, serde_json::Value, String or Vec<u8> by its content type. request(method, path, RequestOptions) is the untyped escape hatch the typed methods share.