Skip to main content

Crate one

Crate one 

Source
Expand description

The One SDK - a typed client over the One API.

The transport layer is generated by progenitor from the One API’s OpenAPI snapshot. The hand-written facade (One) wraps it with auth and ergonomic, verb-less action calls. Each platform’s typed actions ship as their own crate, withone-<platform>, built on this one.

Re-exports§

pub use crate::transport::types::PaginatedVaultConnectionViewRowsItem as Connection;

Modules§

transport
Generated transport client (progenitor over the committed SDK spec).

Structs§

CallResponse
A successful (2xx) response, tagged with the action’s default output type Out (the io_schema output, or Value for raw calls). Holds the raw body; CallResponse::output decodes the default, CallResponse::json any caller type.
ConnectionScope
A connection-scoped handle. The engine (ConnectionScope::run) executes declarative Operations against this connection.
ConnectionWebhooks
Handlers scoped to a single connection. Only the events that carry a connection are offered here, so a scoped handler can never be one that could not fire.
Delivery
A verified delivery, with the payload still typed as raw JSON.
Method
The Request Method (VERB)
One
The One SDK client.
OneBuilder
Builder for One.
Operation
A declarative description of an action invocation.
RetrySchedule
Bounded exponential-backoff schedule — the shared timing vocabulary for retries, used by both the call engine and (later) webhook handler retry. It holds no HTTP concepts: per-attempt delay doubles up to max_delay and total attempts are capped by max_attempts.
Route
Where one field of a generated action’s flat input goes in the request.
Routing
How a generated action’s flat input maps onto its request.
StatusCode
An HTTP status code (status-code in RFC 9110 et al.).
Tenancy
The tenant a request acts within: an organization, optionally narrowed to one of its projects. Empty means the caller’s own personal scope.
Webhooks
A registry of typed webhook handlers plus the listener registration that makes One send them.

Enums§

Credential
What the client authenticates with.
Error
Errors returned by SDK calls.
Part
A part of an action request that a flat input field is routed into.
WebhookError
Failures from verifying, parsing, or registering a webhook.
WebhookEventType
Every event a One webhook subscription can deliver.

Traits§

IntoOperation
Anything ConnectionScope::run executes: an Operation, or a generated action’s input or builder.
Retryable
Marker trait for errors that can be classified as transient — eligible for automatic retry — versus structural, where retrying is wasted work. This is the general classifier used by WithRetry; HTTP status classification (retry_on, Retry-After) is a separate concern that lives on the call.
WebhookHandlerOutput
A webhook handler’s completion value.
WithRetry
Postfix retry combinator over an async operation factory — the general retry engine (e.g. for retrying a whole webhook handler). The receiver must be a factory (FnMut() -> Future) rather than a Future, because a Future is single-use — every retry attempt needs a freshly-produced one.

Type Aliases§

HandlerFuture
A handler’s returned work, boxed so handlers of different concrete future types share one registry.