Skip to main content

Client

Struct Client 

Source
pub struct Client { /* private fields */ }
Expand description

Client for API v0.0.0.

Capsule’s server surface: one REST contract every client, and every federated server, speaks. The server holds no keys. Every write is sealed on the client before it is sent, and the sync feed returns opaque envelopes, so no operation accepts or returns a plaintext asset.

§Protocol negotiation

HeaderDirectionRule
X-Capsule-ProtocolrequestRequired on every gated operation.
X-Capsule-Crypto-SuiterequestSent on writes; validated when present.
X-Capsule-Sidecar-SchemarequestValidated when present; absence is not refused.
X-Capsule-Protocol-Min, -MaxresponseOn every response, including 401, 413, 426 and an unrouted 404 or 405.
X-Capsule-Min-Client-BuildresponseOn every response. Advisory; 0.0.0 means no cutoff.
X-Request-IdresponseOn every response: a UUIDv7 the server mints. An inbound value is ignored, never echoed.
  • A write (any method but GET and HEAD) whose protocol is outside [Min, Max] is 426 error.protocol.version_unsupported; the window is only in the headers.
  • A read (GET or HEAD) is admitted at any well-formed protocol date, past or future.
  • A missing or malformed header on a gated operation is 400 error.request.malformed.
  • The advertised window and the enforced one come from one source and cannot differ.

These operations skip the request gate and still carry the response headers:

  • GET /v1/version: the probe a client makes before it knows the window.
  • GET /.well-known/capsule/*: public discovery.
  • /s/{opaque_id} and its wrapped-secret and blob/{hash} reads: a 426 would break a share link’s indistinguishable 404.
  • POST /d/{opaque_id} and PATCH/GET /d/{opaque_id}/{upload_id}: the drop link pinned its versions when it was issued.
  • POST /v1/auth/refresh and POST /v1/auth/logout: refusing them would cut off reads that are still allowed, or keep open a session its holder closed. Login and register stay gated.

§Credentials

One bearer security scheme, Authorization: Bearer, carries both kinds of credential: a session’s access token and a federation capability. Each is verified by the module that issued it, and the generated client keeps one credential.

§Errors

Every rejection is an RFC 9457 problem whose code member is a stable error.* catalog code. A client switches on code, never on the status alone, and localizes it itself. request_id repeats the response’s X-Request-Id: a client shows it for the user to quote and never parses it. It is declared on every problem but never required, so a client stays lenient toward a server that predates it.

The common rejection classes and their statuses follow; each operation lists every status it can return.

RejectionStatus
Structural: bad envelope, unknown enum, sizes400
Unauthenticated or expired token401
Unauthorized: capability, hard quota, suspension403
Not found, including the indistinguishable-404 surfaces404
Stale state: chain, cursor, directory regression409
Gone: a superseded or deleted record410
Payload too large413
Unsupported chunk media type415
A write forwarded as TLS early data425
Protocol outside [Min, Max]426
Rate limited429
A fault the server can explain, such as a store outage503 with Retry-After
Storage full507
Unexplained internal state, logged at ERROR500

Tags: auth — Establishing, rotating and ending a session.; devices — The session ledger and the signed device directory: listing an account’s devices, revoking one, and publishing and fetching the keys to trust for them.; escrow — Storing and fetching the wrapped account master key. Opaque to the server.; profile — What an account knows about itself, and changing its password.; totp — Enrolling a time-based one-time-password authenticator, and signing in with it.; oidc — Signing in through an external OpenID Connect identity provider.; enrollment — Cross-device add: the one-time code, and the relay channel it opens.; albums — Binding a client-derived album id to its owner.; upload — Opening a resumable upload session and feeding it chunks.; storage — Confirming durability before a client destroys its local copy.; sync — Discovering what changed in a library, as an opaque, resumable feed.; shares — Public share links. The only surface served without an account.; drops — Guest uploads through a capability link, and the inbox they land in.; lifecycle — Applying a signed lifecycle manifest to an album’s assets.; federation — Minting, revoking and refreshing the capability a peer server pulls with.; quota — Reporting storage use so a client can act before an import fails.; moderation — An account’s own moderation record. No silent operations.; media — Fetching content-addressed ciphertext, resumably.; well-known — Public, server-scoped discovery records. Never a user list..

Implementations§

Source§

impl Client

Source

pub fn new(base_url: &str) -> Result<Self, Error<Infallible>>

Build a client on the default ClientConfig and TransportConfig: a 30 s connect timeout, a 5 min read (stall) timeout, and no total timeout. Self::with_config changes any of them. Fails with Error::RequestConstruction if base_url is not an http or https URL.

Source

pub fn with_config( base_url: &str, configure: impl FnOnce(&mut ClientConfig, &mut TransportConfig), ) -> Result<Self, Error<Infallible>>

Build a client whose ClientConfig and TransportConfig are the default ones as configure leaves them: the total timeout and body limits on the first, the connect and read timeouts on the second. The reqwest::Client its default backend runs on is built from the TransportConfig as it is when configure returns, which is the one place it is read. Fails with Error::RequestConstruction if base_url is not an http or https URL.

Source

pub fn with_client( client: Client, base_url: &str, ) -> Result<Self, Error<Infallible>>

Build a client that sends its requests on a caller-supplied reqwest::Client, as with_backend does with ReqwestBackend::new(client): your client’s timeouts apply instead of a TransportConfig’s connect and read timeouts.

Source

pub fn with_backend( backend: Arc<dyn HttpBackend>, base_url: &str, ) -> Result<Self, Error<Infallible>>

Build a client over a caller-supplied transport backend — the injection point for retry, middleware, or a non-reqwest transport — which executes every request; the client builds no HTTP client of its own, so many clients can share one backend. Connecting and reading are bounded however the backend bounds them, and the total timeout travels on each request as a TotalTimeout extension for it to enforce.

Source

pub fn core(&self) -> &ClientCore

Source

pub fn with_bearer(self, token: SecretString) -> Self

Register a static token for the security scheme bearer, sent as Authorization: Bearer <token>, replacing any credential registered for it.

An operation attaches the first non-empty alternative of its security whose schemes all have a credential registered. Where none has, an empty alternative ({}) sends the call anonymously, but only when the operation lists one and no scheme of its other alternatives has a credential registered; otherwise the call fails before anything is sent, as Error::RequestConstruction with RequestError::MissingCredential. It never falls through past the alternative it chose: a credential that fails to attach fails the call, and without_bearer is how a caller reaches a later alternative.

§Scheme
  • bearer — http (bearer).
    • A Capsule bearer credential: a short-lived access token, issued by POST /v1/auth/login and rotated by POST /v1/auth/refresh, or, on the federation pull reads, a federation capability.
    • Bearer format: JWT.
Source

pub fn with_bearer_provider(self, provider: TokenProvider) -> Self

Register provider for the security scheme bearer, replacing any credential registered for it: it is asked for a fresh token each time a call attaches the scheme, and a call whose provider fails fails before anything is sent, as RequestError::CredentialProvider. token_provider builds one from an async closure.

Source

pub fn with_bearer_refreshable<P, R, Fut>( self, token: TokenProvider, is_rejection: P, on_rejected: R, ) -> Self
where P: Fn(&Response<Bytes>) -> bool + MaybeSend + MaybeSync + 'static, R: Fn(SecretString) -> Fut + MaybeSend + MaybeSync + 'static, Fut: Future<Output = Result<SecretString, AuthError>> + MaybeSend + 'static,

Register a refreshable token for the security scheme bearer, replacing any credential registered for it: token yields the token each call attaches, and when a call’s failed response is one is_rejection reads as a rejection of that token, on_rejected is given it and yields a fresh one, and the call is sent once more with it. Credential::Refreshable’s documentation states when that replay happens and what the call returns.

Source

pub fn without_bearer(self) -> Self

Unregister the credential for the security scheme bearer; one never registered is left as it is. Operations pick the first non-empty security alternative whose schemes are all registered and never fall through past it when attaching fails, so this is how a caller reaches a later alternative: the client this returns no longer selects one listing bearer.

Source

pub fn with_timeout(self, timeout: Option<Duration>) -> Self

Set the total timeout of every call made through this client value, replacing ClientConfig::timeout from with_config (or the default, none): a call that has not read its whole response within it fails with Error::Timeout(TimeoutKind::Total). None sets no total bound of this client’s own; the connect and read timeouts still apply, and so does a total timeout set on a reqwest::Client injected with with_client, which a request cannot lift. An operation returning an EventStream is exempt, as it is from ClientConfig::timeout, since a stream may rightly stay open indefinitely. Derive a client for a different deadline: client.clone().with_timeout(Some(duration)).

Source

pub fn with_options(self, options: RequestOptions) -> Self

Set the RequestOptions every call made through this client value carries, replacing the ones it had (none, until this is called): max_body bounds a non-streaming call’s response body, failing it with Error::BodyTooLarge past the limit; extensions are copied onto each request, for a transport backend to read; headers are added to each request that does not already carry them. Derive a client for one call’s options: client.clone().with_options(options).operation(..).

Source

pub fn with_base_url(self, base_url: &str) -> Result<Self, Error<Infallible>>

Repoint this client value at another base URL, keeping its transport backend, configuration and credentials, so nothing is rebuilt: derive one with client.clone().with_base_url(url)?. Fails with Error::RequestConstruction if base_url is not an http or https URL.

Source

pub async fn register_user( &self, params: impl Into<RegisterUserParams>, body: impl Into<RegisterRequest>, ) -> Result<ResponseValue<TokenResponse>, Error<RegisterUserError>>

Create an account, and open its first session.

§Why it signs you in

The alternative is 201 with no body and a client that immediately posts the same credentials to /v1/auth/login, which is one more round trip for one more chance to fail and nothing gained. It also makes the CLI’s capsule register mean what a person expects: after it, you are registered and signed in.

§What it does not do

It does not publish a device directory, and the account is therefore unable to upload until its client publishes one. That is not an omission here: there is deliberately no account-creation fallback for invariant 7’s floor, precisely so that “was this device in the directory” has an honest answer for a brand-new account, and the honest answer is no. A client’s first action after registering is POST /v1/auth/devices/directory.

§Rate-limited per source

This is the one unauthenticated write on the surface, and its 409 is an account oracle, so every attempt whose body parses is charged against budgets::REGISTRATION_SOURCE for the trusted client address before the address and password are validated or the registry is asked anything: probing costs the prober whatever the answer. A body the Json extractor refuses (400/415/422) never reaches the handler and is not charged; it learns nothing about any account. A spent budget is 429 error.auth.rate_limited and a full limiter partition 429 error.auth.registration_at_capacity, both with Retry-After; a counter store that cannot answer is 500, never an admission.

§200, where Salvo answered 201

Kynos’s Created requires a Location — a 201 that does not say where tells a client something exists and not how to reach it, which is a defect the type refuses to let you commit. This server exposes no URL for an account: GET /v1/auth/profile is among the operations not ported to this server. Inventing a location to satisfy a status would be inventing a surface, so the status moved instead. What a caller actually needs — the token pair — is in the body either way.

Tags: auth.

Response 400: Bad Request; Invalid registration; Malformed handshake

Response 408: Request Timeout

Response 413: Payload Too Large; the request body exceeds the configured limit

Response 415: Unsupported Media Type

Response 422: Unprocessable Entity

Response 200: OK

Response 409: Account already exists

Response 403: Password sign-in disabled

Response 429: Too many requests

Response 500: Internal server error

Response 425: Too early

Response 426: Protocol version unsupported

Source

pub async fn register_user_request( &self, params: impl Into<RegisterUserParams>, body: impl Into<RegisterRequest>, ) -> Result<Request<HttpBody>, Error<Infallible>>

The request register_user sends, built exactly as it builds it — its URL, headers, credentials and body, the client’s RequestOptions headers and extensions, and its ops::Operation among the extensions — without sending it, for a caller that sends it itself (signing it, pacing it, or over another transport) and hands the response to its decoder. Nothing is replayed after a rejected refreshable credential: that is register_user’s own send.

Source

pub async fn decode_register_user( &self, response: Response<HttpBody>, ) -> Result<ResponseValue<TokenResponse>, Error<RegisterUserError>>

Decode a response to the request register_user sends (ops::REGISTER_USER), obtained however the caller sent it, exactly as register_user decodes its own: the same status dispatch, typed error, and body limits from this client’s configuration. register_user itself sends its request builder’s request through the client’s backend, replays it once where a refreshable credential was rejected, and decodes the response with this.

Source

pub fn register_user_url(&self) -> Result<Url, Error<Infallible>>

The URL register_user sends its request to, less any apiKey query credential, with the same path and query encoding, resolved against the client’s base URL or the operation’s server override. Nothing is sent and no credential is attached: this is for a URL handed to something that fetches it itself.

Source

pub async fn login_user( &self, params: impl Into<LoginUserParams>, body: impl Into<LoginRequest>, ) -> Result<ResponseValue<LoginUserResponse>, Error<LoginUserError>>

Exchange an email and password for a session — or for a second-factor challenge.

The two advisory identifiers a client may send — cohort_hash and device_id — are recorded on the session for the devices listing and gate nothing; an unusable one is dropped rather than refused.

§Two statuses, because there are two outcomes

An account with a confirmed second factor gets 202 and a short-lived challenge: the credentials were accepted and the request is not complete. No session is opened, no cohort is recorded and no refresh token is minted, because none of those may exist for an authentication that has not finished — and the client’s advisory identifiers ride the completing request instead, since that is what creates the session they describe.

The retired surface got this wrong in the most consequential way available: it had all four TOTP operations and its login never issued a challenge, so a confirmed second factor gated nothing at all.

Tags: auth.

Response 400: Bad Request; Malformed handshake

Response 408: Request Timeout

Response 413: Payload Too Large; the request body exceeds the configured limit

Response 415: Unsupported Media Type

Response 422: Unprocessable Entity

Response 200: A session was opened; here is its token pair.

Response 202: The password verified; a second factor is required to finish.

Response 401: Invalid credentials

Response 403: Password sign-in disabled

Response 423: Account locked

Response 500: Internal server error

Response 425: Too early

Response 426: Protocol version unsupported

Source

pub async fn login_user_request( &self, params: impl Into<LoginUserParams>, body: impl Into<LoginRequest>, ) -> Result<Request<HttpBody>, Error<Infallible>>

The request login_user sends, built exactly as it builds it — its URL, headers, credentials and body, the client’s RequestOptions headers and extensions, and its ops::Operation among the extensions — without sending it, for a caller that sends it itself (signing it, pacing it, or over another transport) and hands the response to its decoder. Nothing is replayed after a rejected refreshable credential: that is login_user’s own send.

Source

pub async fn decode_login_user( &self, response: Response<HttpBody>, ) -> Result<ResponseValue<LoginUserResponse>, Error<LoginUserError>>

Decode a response to the request login_user sends (ops::LOGIN_USER), obtained however the caller sent it, exactly as login_user decodes its own: the same status dispatch, typed error, and body limits from this client’s configuration. login_user itself sends its request builder’s request through the client’s backend, replays it once where a refreshable credential was rejected, and decodes the response with this.

Source

pub fn login_user_url(&self) -> Result<Url, Error<Infallible>>

The URL login_user sends its request to, less any apiKey query credential, with the same path and query encoding, resolved against the client’s base URL or the operation’s server override. Nothing is sent and no credential is attached: this is for a URL handed to something that fetches it itself.

Source

pub async fn revoke_all_challenge( &self, params: impl Into<RevokeAllChallengeParams>, ) -> Result<ResponseValue<RevokeChallengeResponse>, Error<RevokeAllChallengeError>>

Issue a single-use challenge for a global sign-out.

Authenticated by a session token, unlike the revoke itself. That is not a contradiction of the ceremony’s asymmetry: a challenge is worthless without the identity key, so handing one to a stolen token costs nothing — while issuing them unauthenticated would make this an oracle for whether an account exists. The account comes from the credential and never from a request field, so a caller cannot ask for somebody else’s challenge.

Tags: auth.

Response 401: Unauthorized; Master-key proof required; Master-key proof invalid

Response 403: Forbidden

Response 200: OK

Response 500: Internal server error

Response 425: Too early

Response 413: the request body exceeds the configured limit

Response 400: Bad Request; Malformed handshake

Response 426: Protocol version unsupported

Source

pub async fn revoke_all_challenge_request( &self, params: impl Into<RevokeAllChallengeParams>, ) -> Result<Request<HttpBody>, Error<Infallible>>

The request revoke_all_challenge sends, built exactly as it builds it — its URL, headers, credentials and body, the client’s RequestOptions headers and extensions, and its ops::Operation among the extensions — without sending it, for a caller that sends it itself (signing it, pacing it, or over another transport) and hands the response to its decoder. Nothing is replayed after a rejected refreshable credential: that is revoke_all_challenge’s own send.

Source

pub async fn decode_revoke_all_challenge( &self, response: Response<HttpBody>, ) -> Result<ResponseValue<RevokeChallengeResponse>, Error<RevokeAllChallengeError>>

Decode a response to the request revoke_all_challenge sends (ops::REVOKE_ALL_CHALLENGE), obtained however the caller sent it, exactly as revoke_all_challenge decodes its own: the same status dispatch, typed error, and body limits from this client’s configuration. revoke_all_challenge itself sends its request builder’s request through the client’s backend, replays it once where a refreshable credential was rejected, and decodes the response with this.

Source

pub fn revoke_all_challenge_url(&self) -> Result<Url, Error<Infallible>>

The URL revoke_all_challenge sends its request to, less any apiKey query credential, with the same path and query encoding, resolved against the client’s base URL or the operation’s server override. Nothing is sent and no credential is attached: this is for a URL handed to something that fetches it itself.

Source

pub async fn revoke_all( &self, params: impl Into<RevokeAllParams>, body: impl Into<RevokeAllRequest>, ) -> Result<ResponseValue<RevokeAllResponse>, Error<RevokeAllError>>

Close every session for the account the proof establishes.

No Auth, deliberately. design/authentication.md gates this on proof of master-key possession instead of a session token, and the reason is the damage scenario: an attacker holding a stolen token could otherwise invoke “log out of all devices” and lock the legitimate user out of every device they own. Requiring the identity key means a stolen token can revoke only itself. The account is established by the burned challenge, so there is no account field for a caller to aim at either.

The caller’s own session goes with the rest. That is the ceremony, not an oversight.

Tags: auth.

Response 400: Bad Request; Malformed handshake

Response 408: Request Timeout

Response 413: Payload Too Large; the request body exceeds the configured limit

Response 415: Unsupported Media Type

Response 422: Unprocessable Entity

Response 200: OK

Response 401: Master-key proof required; Master-key proof invalid

Response 500: Internal server error

Response 425: Too early

Response 426: Protocol version unsupported

Source

pub async fn revoke_all_request( &self, params: impl Into<RevokeAllParams>, body: impl Into<RevokeAllRequest>, ) -> Result<Request<HttpBody>, Error<Infallible>>

The request revoke_all sends, built exactly as it builds it — its URL, headers, credentials and body, the client’s RequestOptions headers and extensions, and its ops::Operation among the extensions — without sending it, for a caller that sends it itself (signing it, pacing it, or over another transport) and hands the response to its decoder. Nothing is replayed after a rejected refreshable credential: that is revoke_all’s own send.

Source

pub async fn decode_revoke_all( &self, response: Response<HttpBody>, ) -> Result<ResponseValue<RevokeAllResponse>, Error<RevokeAllError>>

Decode a response to the request revoke_all sends (ops::REVOKE_ALL), obtained however the caller sent it, exactly as revoke_all decodes its own: the same status dispatch, typed error, and body limits from this client’s configuration. revoke_all itself sends its request builder’s request through the client’s backend, replays it once where a refreshable credential was rejected, and decodes the response with this.

Source

pub fn revoke_all_url(&self) -> Result<Url, Error<Infallible>>

The URL revoke_all sends its request to, less any apiKey query credential, with the same path and query encoding, resolved against the client’s base URL or the operation’s server override. Nothing is sent and no credential is attached: this is for a URL handed to something that fetches it itself.

Source

pub async fn reauthenticate( &self, params: impl Into<ReauthenticateParams>, body: impl Into<ReauthenticateRequest>, ) -> Result<ResponseValue<ReauthenticateResponse>, Error<ReauthenticateError>>

Prove a credential again on the current session, without opening a new one.

The only way to satisfy the freshness gate sensitive operations enforce, and it exists because without it the gate is unusable: authenticated_at is deliberately not reset by a refresh, so a user signed in an hour ago would otherwise have to sign out entirely to add a device — and the session they abandoned would linger in their own devices listing.

It does not mint tokens and does not rotate the session. The caller keeps the credential they already hold; what changes is one timestamp on the record behind it.

§Errors

The same refusals as a sign-in, for the same reasons: a wrong password is 401 error.auth.invalid_credentials, a locked account is 403, and the account directory failing is 500. A caller that guessed a password here learns exactly what it would learn at /v1/auth/login, and no more. A deployment that refuses passwords answers 403 error.auth.password_disabled before the password is checked, as login does.

Tags: auth.

Response 401: Unauthorized; Invalid credentials

Response 403: Forbidden; Password sign-in disabled

Response 400: Bad Request; Malformed handshake

Response 408: Request Timeout

Response 413: Payload Too Large; the request body exceeds the configured limit

Response 415: Unsupported Media Type

Response 422: Unprocessable Entity

Response 200: OK

Response 423: Account locked

Response 500: Internal server error

Response 425: Too early

Response 426: Protocol version unsupported

Source

pub async fn reauthenticate_request( &self, params: impl Into<ReauthenticateParams>, body: impl Into<ReauthenticateRequest>, ) -> Result<Request<HttpBody>, Error<Infallible>>

The request reauthenticate sends, built exactly as it builds it — its URL, headers, credentials and body, the client’s RequestOptions headers and extensions, and its ops::Operation among the extensions — without sending it, for a caller that sends it itself (signing it, pacing it, or over another transport) and hands the response to its decoder. Nothing is replayed after a rejected refreshable credential: that is reauthenticate’s own send.

Source

pub async fn decode_reauthenticate( &self, response: Response<HttpBody>, ) -> Result<ResponseValue<ReauthenticateResponse>, Error<ReauthenticateError>>

Decode a response to the request reauthenticate sends (ops::REAUTHENTICATE), obtained however the caller sent it, exactly as reauthenticate decodes its own: the same status dispatch, typed error, and body limits from this client’s configuration. reauthenticate itself sends its request builder’s request through the client’s backend, replays it once where a refreshable credential was rejected, and decodes the response with this.

Source

pub fn reauthenticate_url(&self) -> Result<Url, Error<Infallible>>

The URL reauthenticate sends its request to, less any apiKey query credential, with the same path and query encoding, resolved against the client’s base URL or the operation’s server override. Nothing is sent and no credential is attached: this is for a URL handed to something that fetches it itself.

Source

pub async fn revoke_session( &self, session_id: impl Into<SessionId>, params: impl Into<RevokeSessionParams>, ) -> Result<ResponseValue<()>, Error<RevokeSessionError>>

Revoke one of the caller’s sessions.

Any live token may do this, including for the session making the request — signing this device out is a legitimate thing to ask for, and refusing it would only push a client into calling logout and hoping the two behave the same.

Only the caller’s own sessions. The ownership check is against the record the store returns rather than against a separate lookup, so there is no window between checking and closing, and a session id belonging to another account answers exactly as an unknown one does.

Tags: devices.

Response 401: Unauthorized

Response 403: Forbidden

Response 400: Bad Request; Malformed handshake

Response 204: the request succeeded and there is no content to send

Response 404: Not found

Response 500: Internal server error

Response 425: Too early

Response 413: the request body exceeds the configured limit

Response 426: Protocol version unsupported

Source

pub async fn revoke_session_request( &self, session_id: impl Into<SessionId>, params: impl Into<RevokeSessionParams>, ) -> Result<Request<HttpBody>, Error<Infallible>>

The request revoke_session sends, built exactly as it builds it — its URL, headers, credentials and body, the client’s RequestOptions headers and extensions, and its ops::Operation among the extensions — without sending it, for a caller that sends it itself (signing it, pacing it, or over another transport) and hands the response to its decoder. Nothing is replayed after a rejected refreshable credential: that is revoke_session’s own send.

Source

pub async fn decode_revoke_session( &self, response: Response<HttpBody>, ) -> Result<ResponseValue<()>, Error<RevokeSessionError>>

Decode a response to the request revoke_session sends (ops::REVOKE_SESSION), obtained however the caller sent it, exactly as revoke_session decodes its own: the same status dispatch, typed error, and body limits from this client’s configuration. revoke_session itself sends its request builder’s request through the client’s backend, replays it once where a refreshable credential was rejected, and decodes the response with this.

Source

pub fn revoke_session_url( &self, session_id: impl Into<SessionId>, ) -> Result<Url, Error<Infallible>>

The URL revoke_session sends its request to, less any apiKey query credential, with the same path and query encoding, resolved against the client’s base URL or the operation’s server override. Nothing is sent and no credential is attached: this is for a URL handed to something that fetches it itself.

Source

pub async fn fetch_escrow( &self, params: impl Into<FetchEscrowParams>, ) -> Result<ResponseValue<ResponseBodyAe08e767>, Error<FetchEscrowError>>

Fetch the caller’s wrapped master key, verbatim.

The bytes are what a client runs its KDF against, so they come back exactly as they went in. The server never derives, unwraps or re-encodes: a re-encoded wrap is a wrap that no longer opens, and the failure would look like a lost master key.

Tags: escrow.

Response 401: Unauthorized

Response 403: Forbidden

Response 200: OK

Response 404: Not found

Response 500: Internal server error

Response 413: the request body exceeds the configured limit

Response 400: Bad Request; Malformed handshake

Source

pub async fn fetch_escrow_request( &self, params: impl Into<FetchEscrowParams>, ) -> Result<Request<HttpBody>, Error<Infallible>>

The request fetch_escrow sends, built exactly as it builds it — its URL, headers, credentials and body, the client’s RequestOptions headers and extensions, and its ops::Operation among the extensions — without sending it, for a caller that sends it itself (signing it, pacing it, or over another transport) and hands the response to its decoder. Nothing is replayed after a rejected refreshable credential: that is fetch_escrow’s own send.

Source

pub async fn decode_fetch_escrow( &self, response: Response<HttpBody>, ) -> Result<ResponseValue<ResponseBodyAe08e767>, Error<FetchEscrowError>>

Decode a response to the request fetch_escrow sends (ops::FETCH_ESCROW), obtained however the caller sent it, exactly as fetch_escrow decodes its own: the same status dispatch, typed error, and body limits from this client’s configuration. fetch_escrow itself sends its request builder’s request through the client’s backend, replays it once where a refreshable credential was rejected, and decodes the response with this.

Source

pub fn fetch_escrow_url(&self) -> Result<Url, Error<Infallible>>

The URL fetch_escrow sends its request to, less any apiKey query credential, with the same path and query encoding, resolved against the client’s base URL or the operation’s server override. Nothing is sent and no credential is attached: this is for a URL handed to something that fetches it itself.

Source

pub async fn fetch_escrow_stream( &self, params: impl Into<FetchEscrowParams>, ) -> Result<ResponseValue<ByteStream>, Error<FetchEscrowError>>

fetch_escrow, with its success body handed over unread as a ByteStream, to read as it arrives, or whole with collect_bounded under a limit of the caller’s choosing. The request and the error branch are fetch_escrow’s. Like an EventStream, the call is exempt from the client’s total timeout and its body limits; its connect and read timeouts still apply. It sends its request builder’s request through the client’s backend, replays it once where a refreshable credential was rejected, and decodes the response with its decoder.

Source

pub async fn fetch_escrow_stream_request( &self, params: impl Into<FetchEscrowParams>, ) -> Result<Request<HttpBody>, Error<Infallible>>

The request fetch_escrow_stream sends, built without sending it: fetch_escrow’s request, exempt from the client’s total timeout as fetch_escrow_stream’s is, for a caller that sends it itself and hands the response to fetch_escrow_stream’s decoder. Nothing is replayed after a rejected refreshable credential: that is fetch_escrow_stream’s own send.

Source

pub async fn decode_fetch_escrow_stream( &self, response: Response<HttpBody>, ) -> Result<ResponseValue<ByteStream>, Error<FetchEscrowError>>

Decode a response to the request fetch_escrow_stream sends (ops::FETCH_ESCROW), obtained however the caller sent it, exactly as fetch_escrow_stream decodes its own: a success body handed over unread as a ByteStream, exempt from the client’s body limits, and an error status dispatched into the operation’s typed error.

Source

pub async fn store_escrow( &self, params: impl Into<StoreEscrowParams>, body: impl Into<HttpBody>, ) -> Result<ResponseValue<StoreEscrowResponse>, Error<StoreEscrowError>>

Store the caller’s wrapped master key, replacing whatever they had.

PUT, because there is exactly one escrow per account and this is its address. Storing over an existing escrow is the guided re-wrap, and it deletes the old blob in the same operation — the lost recovery secret must stop working, which is the entire point of rotating.

Tags: escrow.

Response 401: Unauthorized

Response 403: Forbidden

Response 415: Unsupported media type

Response 400: Malformed request; Malformed escrow; Bad Request; Malformed handshake

Response 200: OK

Response 500: Internal server error

Response 425: Too early

Response 413: the request body exceeds the configured limit

Response 426: Protocol version unsupported The request body is a types::StoreEscrowBody (bytes::Bytes) or a Vec<u8>, moved in without a copy, or an HttpBody::wrap stream, sent as it is read and never replayed.

Source

pub async fn store_escrow_request( &self, params: impl Into<StoreEscrowParams>, body: impl Into<HttpBody>, ) -> Result<Request<HttpBody>, Error<Infallible>>

The request store_escrow sends, built exactly as it builds it — its URL, headers, credentials and body, the client’s RequestOptions headers and extensions, and its ops::Operation among the extensions — without sending it, for a caller that sends it itself (signing it, pacing it, or over another transport) and hands the response to its decoder. Nothing is replayed after a rejected refreshable credential: that is store_escrow’s own send.

Source

pub async fn decode_store_escrow( &self, response: Response<HttpBody>, ) -> Result<ResponseValue<StoreEscrowResponse>, Error<StoreEscrowError>>

Decode a response to the request store_escrow sends (ops::STORE_ESCROW), obtained however the caller sent it, exactly as store_escrow decodes its own: the same status dispatch, typed error, and body limits from this client’s configuration. store_escrow itself sends its request builder’s request through the client’s backend, replays it once where a refreshable credential was rejected, and decodes the response with this.

Source

pub fn store_escrow_url(&self) -> Result<Url, Error<Infallible>>

The URL store_escrow sends its request to, less any apiKey query credential, with the same path and query encoding, resolved against the client’s base URL or the operation’s server override. Nothing is sent and no credential is attached: this is for a URL handed to something that fetches it itself.

Source

pub async fn fetch_sealed_identity( &self, params: impl Into<FetchSealedIdentityParams>, ) -> Result<ResponseValue<ResponseBody828f4982>, Error<FetchSealedIdentityError>>

Fetch the caller’s sealed identity, verbatim.

Byte for byte, like the escrow: the client opens it under the master key it recovered, and a re-encoded seal is a seal that no longer opens.

Tags: escrow.

Response 401: Unauthorized

Response 403: Forbidden

Response 200: OK

Response 404: Not found

Response 500: Internal server error

Response 413: the request body exceeds the configured limit

Response 400: Bad Request; Malformed handshake

Source

pub async fn fetch_sealed_identity_request( &self, params: impl Into<FetchSealedIdentityParams>, ) -> Result<Request<HttpBody>, Error<Infallible>>

The request fetch_sealed_identity sends, built exactly as it builds it — its URL, headers, credentials and body, the client’s RequestOptions headers and extensions, and its ops::Operation among the extensions — without sending it, for a caller that sends it itself (signing it, pacing it, or over another transport) and hands the response to its decoder. Nothing is replayed after a rejected refreshable credential: that is fetch_sealed_identity’s own send.

Source

pub async fn decode_fetch_sealed_identity( &self, response: Response<HttpBody>, ) -> Result<ResponseValue<ResponseBody828f4982>, Error<FetchSealedIdentityError>>

Decode a response to the request fetch_sealed_identity sends (ops::FETCH_SEALED_IDENTITY), obtained however the caller sent it, exactly as fetch_sealed_identity decodes its own: the same status dispatch, typed error, and body limits from this client’s configuration. fetch_sealed_identity itself sends its request builder’s request through the client’s backend, replays it once where a refreshable credential was rejected, and decodes the response with this.

Source

pub fn fetch_sealed_identity_url(&self) -> Result<Url, Error<Infallible>>

The URL fetch_sealed_identity sends its request to, less any apiKey query credential, with the same path and query encoding, resolved against the client’s base URL or the operation’s server override. Nothing is sent and no credential is attached: this is for a URL handed to something that fetches it itself.

Source

pub async fn fetch_sealed_identity_stream( &self, params: impl Into<FetchSealedIdentityParams>, ) -> Result<ResponseValue<ByteStream>, Error<FetchSealedIdentityError>>

fetch_sealed_identity, with its success body handed over unread as a ByteStream, to read as it arrives, or whole with collect_bounded under a limit of the caller’s choosing. The request and the error branch are fetch_sealed_identity’s. Like an EventStream, the call is exempt from the client’s total timeout and its body limits; its connect and read timeouts still apply. It sends its request builder’s request through the client’s backend, replays it once where a refreshable credential was rejected, and decodes the response with its decoder.

Source

pub async fn fetch_sealed_identity_stream_request( &self, params: impl Into<FetchSealedIdentityParams>, ) -> Result<Request<HttpBody>, Error<Infallible>>

The request fetch_sealed_identity_stream sends, built without sending it: fetch_sealed_identity’s request, exempt from the client’s total timeout as fetch_sealed_identity_stream’s is, for a caller that sends it itself and hands the response to fetch_sealed_identity_stream’s decoder. Nothing is replayed after a rejected refreshable credential: that is fetch_sealed_identity_stream’s own send.

Source

pub async fn decode_fetch_sealed_identity_stream( &self, response: Response<HttpBody>, ) -> Result<ResponseValue<ByteStream>, Error<FetchSealedIdentityError>>

Decode a response to the request fetch_sealed_identity_stream sends (ops::FETCH_SEALED_IDENTITY), obtained however the caller sent it, exactly as fetch_sealed_identity_stream decodes its own: a success body handed over unread as a ByteStream, exempt from the client’s body limits, and an error status dispatched into the operation’s typed error.

Source

pub async fn store_sealed_identity( &self, params: impl Into<StoreSealedIdentityParams>, body: impl Into<HttpBody>, ) -> Result<ResponseValue<StoreSealedIdentityResponse>, Error<StoreSealedIdentityError>>

Store the caller’s user identity key sealed under their master key, replacing whatever they had.

The sealed identity is ciphertext the server cannot open — it opens only under the master key, which the escrow holds wrapped under a secret the server never sees. It is stored independently of the escrow: a recovery-secret rotation replaces the escrow and leaves this alone, and storing this never touches the escrow. Refused exactly as an escrow is: empty or past the same coarse ceiling.

Tags: escrow.

Response 401: Unauthorized

Response 403: Forbidden

Response 415: Unsupported media type

Response 400: Malformed request; Malformed escrow; Bad Request; Malformed handshake

Response 200: OK

Response 500: Internal server error

Response 425: Too early

Response 413: the request body exceeds the configured limit

Response 426: Protocol version unsupported The request body is a types::StoreSealedIdentityBody (bytes::Bytes) or a Vec<u8>, moved in without a copy, or an HttpBody::wrap stream, sent as it is read and never replayed.

Source

pub async fn store_sealed_identity_request( &self, params: impl Into<StoreSealedIdentityParams>, body: impl Into<HttpBody>, ) -> Result<Request<HttpBody>, Error<Infallible>>

The request store_sealed_identity sends, built exactly as it builds it — its URL, headers, credentials and body, the client’s RequestOptions headers and extensions, and its ops::Operation among the extensions — without sending it, for a caller that sends it itself (signing it, pacing it, or over another transport) and hands the response to its decoder. Nothing is replayed after a rejected refreshable credential: that is store_sealed_identity’s own send.

Source

pub async fn decode_store_sealed_identity( &self, response: Response<HttpBody>, ) -> Result<ResponseValue<StoreSealedIdentityResponse>, Error<StoreSealedIdentityError>>

Decode a response to the request store_sealed_identity sends (ops::STORE_SEALED_IDENTITY), obtained however the caller sent it, exactly as store_sealed_identity decodes its own: the same status dispatch, typed error, and body limits from this client’s configuration. store_sealed_identity itself sends its request builder’s request through the client’s backend, replays it once where a refreshable credential was rejected, and decodes the response with this.

Source

pub fn store_sealed_identity_url(&self) -> Result<Url, Error<Infallible>>

The URL store_sealed_identity sends its request to, less any apiKey query credential, with the same path and query encoding, resolved against the client’s base URL or the operation’s server override. Nothing is sent and no credential is attached: this is for a URL handed to something that fetches it itself.

Source

pub async fn store_album_keys( &self, album_id: impl Into<AlbumId759a63d3>, params: impl Into<StoreAlbumKeysParams>, body: impl Into<HttpBody>, ) -> Result<ResponseValue<StoreAlbumKeysResponse>, Error<StoreAlbumKeysError>>

Store the caller’s key escrow for one album, replacing whatever that album’s slot held.

The album’s whole key state — every epoch’s content key, its signing seeds and its authority — sealed by the client under the account master key, so a device recovered from the escrow can open the album (#741). Opaque here: one slot per album, replaced in one operation, never versioned, and refused only empty, past its coarse ceiling, or past the account’s bound on escrowed albums (409 error.escrow.album_keys_full, crate::escrow::album_keys_fit): slots are never deleted, so without a bound an account could grow them, and the listing every push reads, without limit. The album id is the slot’s name and nothing more; the server does not check the album exists, because a client escrows an album’s keys before the album’s first asset reaches the server.

Tags: escrow.

Response 401: Unauthorized

Response 403: Forbidden

Response 400: Bad Request; Malformed request; Malformed escrow; Malformed handshake

Response 415: Unsupported media type

Response 200: OK

Response 409: Album key escrows full

Response 500: Internal server error

Response 425: Too early

Response 413: the request body exceeds the configured limit

Response 426: Protocol version unsupported The request body is a types::StoreAlbumKeysBody (bytes::Bytes) or a Vec<u8>, moved in without a copy, or an HttpBody::wrap stream, sent as it is read and never replayed.

Source

pub async fn store_album_keys_request( &self, album_id: impl Into<AlbumId759a63d3>, params: impl Into<StoreAlbumKeysParams>, body: impl Into<HttpBody>, ) -> Result<Request<HttpBody>, Error<Infallible>>

The request store_album_keys sends, built exactly as it builds it — its URL, headers, credentials and body, the client’s RequestOptions headers and extensions, and its ops::Operation among the extensions — without sending it, for a caller that sends it itself (signing it, pacing it, or over another transport) and hands the response to its decoder. Nothing is replayed after a rejected refreshable credential: that is store_album_keys’s own send.

Source

pub async fn decode_store_album_keys( &self, response: Response<HttpBody>, ) -> Result<ResponseValue<StoreAlbumKeysResponse>, Error<StoreAlbumKeysError>>

Decode a response to the request store_album_keys sends (ops::STORE_ALBUM_KEYS), obtained however the caller sent it, exactly as store_album_keys decodes its own: the same status dispatch, typed error, and body limits from this client’s configuration. store_album_keys itself sends its request builder’s request through the client’s backend, replays it once where a refreshable credential was rejected, and decodes the response with this.

Source

pub fn store_album_keys_url( &self, album_id: impl Into<AlbumId759a63d3>, ) -> Result<Url, Error<Infallible>>

The URL store_album_keys sends its request to, less any apiKey query credential, with the same path and query encoding, resolved against the client’s base URL or the operation’s server override. Nothing is sent and no credential is attached: this is for a URL handed to something that fetches it itself.

Source

pub async fn get_profile( &self, params: impl Into<GetProfileParams>, ) -> Result<ResponseValue<ProfileResponse>, Error<GetProfileError>>

The caller’s own profile.

There is no {user_id} segment, for the reason the escrow surface has none: the account comes from the credential, so reading somebody else’s profile is not a forbidden request but an unrepresentable one. A directory of other people’s public facts already exists and is a different surface — GET /v1/auth/devices/directory/{user_id} — which publishes keys and nothing else.

Tags: profile.

Response 401: Unauthorized

Response 403: Forbidden

Response 200: OK

Response 404: Not found

Response 500: Internal server error

Response 413: the request body exceeds the configured limit

Response 400: Bad Request; Malformed handshake

Source

pub async fn get_profile_request( &self, params: impl Into<GetProfileParams>, ) -> Result<Request<HttpBody>, Error<Infallible>>

The request get_profile sends, built exactly as it builds it — its URL, headers, credentials and body, the client’s RequestOptions headers and extensions, and its ops::Operation among the extensions — without sending it, for a caller that sends it itself (signing it, pacing it, or over another transport) and hands the response to its decoder. Nothing is replayed after a rejected refreshable credential: that is get_profile’s own send.

Source

pub async fn decode_get_profile( &self, response: Response<HttpBody>, ) -> Result<ResponseValue<ProfileResponse>, Error<GetProfileError>>

Decode a response to the request get_profile sends (ops::GET_PROFILE), obtained however the caller sent it, exactly as get_profile decodes its own: the same status dispatch, typed error, and body limits from this client’s configuration. get_profile itself sends its request builder’s request through the client’s backend, replays it once where a refreshable credential was rejected, and decodes the response with this.

Source

pub fn get_profile_url(&self) -> Result<Url, Error<Infallible>>

The URL get_profile sends its request to, less any apiKey query credential, with the same path and query encoding, resolved against the client’s base URL or the operation’s server override. Nothing is sent and no credential is attached: this is for a URL handed to something that fetches it itself.

Source

pub async fn update_profile( &self, params: impl Into<UpdateProfileParams>, body: impl Into<UpdateProfileRequest>, ) -> Result<ResponseValue<ProfileResponse>, Error<UpdateProfileError>>

Edit the caller’s own profile.

PATCH, because the body is a partial: what it does not mention, it does not change. An empty body is a valid request and answers 200 with the profile unchanged — a client that sent nothing asked for nothing, and refusing it would make “save” fail on a form nobody edited.

Tags: profile.

Response 401: Unauthorized

Response 403: Forbidden

Response 400: Bad Request; Invalid profile; Malformed handshake

Response 408: Request Timeout

Response 413: Payload Too Large; the request body exceeds the configured limit

Response 415: Unsupported Media Type

Response 422: Unprocessable Entity

Response 200: OK

Response 404: Not found

Response 500: Internal server error

Response 425: Too early

Response 426: Protocol version unsupported

Source

pub async fn update_profile_request( &self, params: impl Into<UpdateProfileParams>, body: impl Into<UpdateProfileRequest>, ) -> Result<Request<HttpBody>, Error<Infallible>>

The request update_profile sends, built exactly as it builds it — its URL, headers, credentials and body, the client’s RequestOptions headers and extensions, and its ops::Operation among the extensions — without sending it, for a caller that sends it itself (signing it, pacing it, or over another transport) and hands the response to its decoder. Nothing is replayed after a rejected refreshable credential: that is update_profile’s own send.

Source

pub async fn decode_update_profile( &self, response: Response<HttpBody>, ) -> Result<ResponseValue<ProfileResponse>, Error<UpdateProfileError>>

Decode a response to the request update_profile sends (ops::UPDATE_PROFILE), obtained however the caller sent it, exactly as update_profile decodes its own: the same status dispatch, typed error, and body limits from this client’s configuration. update_profile itself sends its request builder’s request through the client’s backend, replays it once where a refreshable credential was rejected, and decodes the response with this.

Source

pub fn update_profile_url(&self) -> Result<Url, Error<Infallible>>

The URL update_profile sends its request to, less any apiKey query credential, with the same path and query encoding, resolved against the client’s base URL or the operation’s server override. Nothing is sent and no credential is attached: this is for a URL handed to something that fetches it itself.

Source

pub async fn change_password( &self, params: impl Into<ChangePasswordParams>, body: impl Into<ChangePasswordRequest>, ) -> Result<ResponseValue<()>, Error<ChangePasswordError>>

Replace the password this account’s sessions are opened with.

§Every other session ends

A password change whose point is that a credential has leaked would be worthless if the sessions opened with the leaked credential kept working. So the change closes every session of the account — and then re-opens the caller’s own, under its own session id, so the person doing the rotation is not signed out of the device they are doing it on while everybody else is.

Re-opening the same id rather than minting a new one is what lets this answer 204 with no body: the caller’s existing token pair keeps working, because the session it names is still there. Returning a fresh pair was considered and rejected — it would make this a second token mint with none of POST /v1/auth/refresh’s rotation discipline, for no gain.

The re-opened record’s authenticated_at is now, and that is not bookkeeping: presenting the current password is a credential presentation, so a freshness gate measuring from anything earlier would be measuring from the wrong moment.

§Why the order is verify, write, revoke

Verification first, because a wrong current password must change nothing. The write next, because a revocation that ran before it would sign everybody out and then fail. The revocation last, and its failure is logged and not returned: the password is already changed, so answering 500 would tell the caller the rotation did not happen when it did, and they would try again with a current password that is no longer current.

Tags: profile.

Response 401: Unauthorized

Response 403: Forbidden

Response 400: Bad Request; Invalid password; Malformed handshake

Response 408: Request Timeout

Response 413: Payload Too Large; the request body exceeds the configured limit

Response 415: Unsupported Media Type

Response 422: Unprocessable Entity

Response 204: the request succeeded and there is no content to send

Response 423: Account locked

Response 404: Not found

Response 500: Internal server error

Response 425: Too early

Response 426: Protocol version unsupported

Source

pub async fn change_password_request( &self, params: impl Into<ChangePasswordParams>, body: impl Into<ChangePasswordRequest>, ) -> Result<Request<HttpBody>, Error<Infallible>>

The request change_password sends, built exactly as it builds it — its URL, headers, credentials and body, the client’s RequestOptions headers and extensions, and its ops::Operation among the extensions — without sending it, for a caller that sends it itself (signing it, pacing it, or over another transport) and hands the response to its decoder. Nothing is replayed after a rejected refreshable credential: that is change_password’s own send.

Source

pub async fn decode_change_password( &self, response: Response<HttpBody>, ) -> Result<ResponseValue<()>, Error<ChangePasswordError>>

Decode a response to the request change_password sends (ops::CHANGE_PASSWORD), obtained however the caller sent it, exactly as change_password decodes its own: the same status dispatch, typed error, and body limits from this client’s configuration. change_password itself sends its request builder’s request through the client’s backend, replays it once where a refreshable credential was rejected, and decodes the response with this.

Source

pub fn change_password_url(&self) -> Result<Url, Error<Infallible>>

The URL change_password sends its request to, less any apiKey query credential, with the same path and query encoding, resolved against the client’s base URL or the operation’s server override. Nothing is sent and no credential is attached: this is for a URL handed to something that fetches it itself.

Source

pub async fn totp_enroll( &self, params: impl Into<TotpEnrollParams>, ) -> Result<ResponseValue<EnrollmentResponse>, Error<TotpEnrollError>>

Start enrolling an authenticator.

Answers the otpauth:// URI the app scans. Nothing is gated yet: until a code confirms the secret, sign-in is unchanged — which is what stops a mis-scanned QR code from locking somebody out of their own account.

Tags: totp.

Response 401: Unauthorized

Response 403: Forbidden

Response 200: OK

Response 409: Already active

Response 500: Internal server error

Response 425: Too early

Response 413: the request body exceeds the configured limit

Response 400: Bad Request; Malformed handshake

Response 426: Protocol version unsupported

Source

pub async fn totp_enroll_request( &self, params: impl Into<TotpEnrollParams>, ) -> Result<Request<HttpBody>, Error<Infallible>>

The request totp_enroll sends, built exactly as it builds it — its URL, headers, credentials and body, the client’s RequestOptions headers and extensions, and its ops::Operation among the extensions — without sending it, for a caller that sends it itself (signing it, pacing it, or over another transport) and hands the response to its decoder. Nothing is replayed after a rejected refreshable credential: that is totp_enroll’s own send.

Source

pub async fn decode_totp_enroll( &self, response: Response<HttpBody>, ) -> Result<ResponseValue<EnrollmentResponse>, Error<TotpEnrollError>>

Decode a response to the request totp_enroll sends (ops::TOTP_ENROLL), obtained however the caller sent it, exactly as totp_enroll decodes its own: the same status dispatch, typed error, and body limits from this client’s configuration. totp_enroll itself sends its request builder’s request through the client’s backend, replays it once where a refreshable credential was rejected, and decodes the response with this.

Source

pub fn totp_enroll_url(&self) -> Result<Url, Error<Infallible>>

The URL totp_enroll sends its request to, less any apiKey query credential, with the same path and query encoding, resolved against the client’s base URL or the operation’s server override. Nothing is sent and no credential is attached: this is for a URL handed to something that fetches it itself.

Source

pub async fn totp_verify_enrollment( &self, params: impl Into<TotpVerifyEnrollmentParams>, body: impl Into<CodeRequest>, ) -> Result<ResponseValue<()>, Error<TotpVerifyEnrollmentError>>

Confirm an enrollment with a live code.

The confirming code is spent: its step goes straight into the replay ledger, so it cannot also complete a sign-in a moment later. That is the one place the ledger’s first entry comes from, and skipping it would leave the newest code in the account’s history unused.

Tags: totp.

Response 401: Unauthorized

Response 403: Forbidden; Invalid code

Response 400: Bad Request; Malformed handshake

Response 408: Request Timeout

Response 413: Payload Too Large; the request body exceeds the configured limit

Response 415: Unsupported Media Type

Response 422: Unprocessable Entity

Response 204: the request succeeded and there is no content to send

Response 409: Nothing pending

Response 500: Internal server error

Response 425: Too early

Response 426: Protocol version unsupported

Source

pub async fn totp_verify_enrollment_request( &self, params: impl Into<TotpVerifyEnrollmentParams>, body: impl Into<CodeRequest>, ) -> Result<Request<HttpBody>, Error<Infallible>>

The request totp_verify_enrollment sends, built exactly as it builds it — its URL, headers, credentials and body, the client’s RequestOptions headers and extensions, and its ops::Operation among the extensions — without sending it, for a caller that sends it itself (signing it, pacing it, or over another transport) and hands the response to its decoder. Nothing is replayed after a rejected refreshable credential: that is totp_verify_enrollment’s own send.

Source

pub async fn decode_totp_verify_enrollment( &self, response: Response<HttpBody>, ) -> Result<ResponseValue<()>, Error<TotpVerifyEnrollmentError>>

Decode a response to the request totp_verify_enrollment sends (ops::TOTP_VERIFY_ENROLLMENT), obtained however the caller sent it, exactly as totp_verify_enrollment decodes its own: the same status dispatch, typed error, and body limits from this client’s configuration. totp_verify_enrollment itself sends its request builder’s request through the client’s backend, replays it once where a refreshable credential was rejected, and decodes the response with this.

Source

pub fn totp_verify_enrollment_url(&self) -> Result<Url, Error<Infallible>>

The URL totp_verify_enrollment sends its request to, less any apiKey query credential, with the same path and query encoding, resolved against the client’s base URL or the operation’s server override. Nothing is sent and no credential is attached: this is for a URL handed to something that fetches it itself.

Source

pub async fn totp_disable( &self, params: impl Into<TotpDisableParams>, body: impl Into<CodeRequest>, ) -> Result<ResponseValue<()>, Error<TotpDisableError>>

Remove the second factor, on presentation of a live code.

A session is not enough. The whole point of the factor is that a stolen access token is insufficient, and a disable that took only a token would let the token turn off the control that makes it insufficient.

Tags: totp.

Response 401: Unauthorized

Response 403: Forbidden; Invalid code

Response 400: Bad Request; Malformed handshake

Response 408: Request Timeout

Response 413: Payload Too Large; the request body exceeds the configured limit

Response 415: Unsupported Media Type

Response 422: Unprocessable Entity

Response 204: the request succeeded and there is no content to send

Response 409: Not enrolled

Response 500: Internal server error

Response 425: Too early

Response 426: Protocol version unsupported

Source

pub async fn totp_disable_request( &self, params: impl Into<TotpDisableParams>, body: impl Into<CodeRequest>, ) -> Result<Request<HttpBody>, Error<Infallible>>

The request totp_disable sends, built exactly as it builds it — its URL, headers, credentials and body, the client’s RequestOptions headers and extensions, and its ops::Operation among the extensions — without sending it, for a caller that sends it itself (signing it, pacing it, or over another transport) and hands the response to its decoder. Nothing is replayed after a rejected refreshable credential: that is totp_disable’s own send.

Source

pub async fn decode_totp_disable( &self, response: Response<HttpBody>, ) -> Result<ResponseValue<()>, Error<TotpDisableError>>

Decode a response to the request totp_disable sends (ops::TOTP_DISABLE), obtained however the caller sent it, exactly as totp_disable decodes its own: the same status dispatch, typed error, and body limits from this client’s configuration. totp_disable itself sends its request builder’s request through the client’s backend, replays it once where a refreshable credential was rejected, and decodes the response with this.

Source

pub fn totp_disable_url(&self) -> Result<Url, Error<Infallible>>

The URL totp_disable sends its request to, less any apiKey query credential, with the same path and query encoding, resolved against the client’s base URL or the operation’s server override. Nothing is sent and no credential is attached: this is for a URL handed to something that fetches it itself.

Source

pub async fn totp_verify_login( &self, params: impl Into<TotpVerifyLoginParams>, body: impl Into<VerifyLoginRequest>, ) -> Result<ResponseValue<TokenResponse>, Error<TotpVerifyLoginError>>

Complete a sign-in with a code.

This is where the session is opened — not POST /v1/auth/login, which for an account with a second factor opens nothing. The advisory cohort_hash and device_id ride this request for the same reason: the session they describe is created here.

Tags: totp.

Response 400: Bad Request; Malformed handshake

Response 408: Request Timeout

Response 413: Payload Too Large; the request body exceeds the configured limit

Response 415: Unsupported Media Type

Response 422: Unprocessable Entity

Response 200: OK

Response 401: Challenge expired; Invalid code

Response 429: Too many attempts

Response 500: Internal server error

Response 425: Too early

Response 426: Protocol version unsupported

Source

pub async fn totp_verify_login_request( &self, params: impl Into<TotpVerifyLoginParams>, body: impl Into<VerifyLoginRequest>, ) -> Result<Request<HttpBody>, Error<Infallible>>

The request totp_verify_login sends, built exactly as it builds it — its URL, headers, credentials and body, the client’s RequestOptions headers and extensions, and its ops::Operation among the extensions — without sending it, for a caller that sends it itself (signing it, pacing it, or over another transport) and hands the response to its decoder. Nothing is replayed after a rejected refreshable credential: that is totp_verify_login’s own send.

Source

pub async fn decode_totp_verify_login( &self, response: Response<HttpBody>, ) -> Result<ResponseValue<TokenResponse>, Error<TotpVerifyLoginError>>

Decode a response to the request totp_verify_login sends (ops::TOTP_VERIFY_LOGIN), obtained however the caller sent it, exactly as totp_verify_login decodes its own: the same status dispatch, typed error, and body limits from this client’s configuration. totp_verify_login itself sends its request builder’s request through the client’s backend, replays it once where a refreshable credential was rejected, and decodes the response with this.

Source

pub fn totp_verify_login_url(&self) -> Result<Url, Error<Infallible>>

The URL totp_verify_login sends its request to, less any apiKey query credential, with the same path and query encoding, resolved against the client’s base URL or the operation’s server override. Nothing is sent and no credential is attached: this is for a URL handed to something that fetches it itself.

Source

pub async fn begin_oidc_login( &self, params: impl Into<BeginOidcLoginParams>, body: impl Into<OidcAuthorizeRequest>, ) -> Result<ResponseValue<OidcAuthorizationResponse>, Error<BeginOidcLoginError>>

Begin a sign-in through the identity provider.

Unauthenticated: this is how a person becomes a session. Nothing about the account is known yet — the ceremony carries fresh random state, nonce and PKCE material and the admitted redirect URI, and the record behind the state lives for ten minutes.

Bounded twice, because it is an unauthenticated write into a store: a budget per redirect host (budgets::OIDC_AUTHORIZE) answers 429 before anything is done, and the store’s own ceiling answers 503 when it is nevertheless full.

Tags: oidc.

Response 400: Bad Request; Redirect not admitted; Binding challenge malformed; Malformed handshake

Response 408: Request Timeout

Response 413: Payload Too Large; the request body exceeds the configured limit

Response 415: Unsupported Media Type

Response 422: Unprocessable Entity

Response 200: OK

Response 404: Single sign-on not configured

Response 429: Too many sign-ins

Response 503: Sign-in capacity reached

Response 500: Internal server error

Response 425: Too early

Response 426: Protocol version unsupported

Source

pub async fn begin_oidc_login_request( &self, params: impl Into<BeginOidcLoginParams>, body: impl Into<OidcAuthorizeRequest>, ) -> Result<Request<HttpBody>, Error<Infallible>>

The request begin_oidc_login sends, built exactly as it builds it — its URL, headers, credentials and body, the client’s RequestOptions headers and extensions, and its ops::Operation among the extensions — without sending it, for a caller that sends it itself (signing it, pacing it, or over another transport) and hands the response to its decoder. Nothing is replayed after a rejected refreshable credential: that is begin_oidc_login’s own send.

Source

pub async fn decode_begin_oidc_login( &self, response: Response<HttpBody>, ) -> Result<ResponseValue<OidcAuthorizationResponse>, Error<BeginOidcLoginError>>

Decode a response to the request begin_oidc_login sends (ops::BEGIN_OIDC_LOGIN), obtained however the caller sent it, exactly as begin_oidc_login decodes its own: the same status dispatch, typed error, and body limits from this client’s configuration. begin_oidc_login itself sends its request builder’s request through the client’s backend, replays it once where a refreshable credential was rejected, and decodes the response with this.

Source

pub fn begin_oidc_login_url(&self) -> Result<Url, Error<Infallible>>

The URL begin_oidc_login sends its request to, less any apiKey query credential, with the same path and query encoding, resolved against the client’s base URL or the operation’s server override. Nothing is sent and no credential is attached: this is for a URL handed to something that fetches it itself.

Source

pub async fn complete_oidc_login( &self, params: impl Into<CompleteOidcLoginParams>, body: impl Into<OidcCallbackRequest>, ) -> Result<ResponseValue<CompleteOidcLoginResponse>, Error<CompleteOidcLoginError>>

Finish a sign-in with what the provider’s redirect carried.

The state is burned first and whatever happens next: a ceremony that survived a failed callback would be a ceremony an attacker could retry a stolen code against. Then the code is exchanged and the ID token verified by the provider adapter, the identity is resolved to an account — created on first sight, keyed on (issuer, subject), never linked by address — and the session is opened exactly as a password sign-in opens one, second factor included.

Tags: oidc.

Response 400: Bad Request; Malformed handshake

Response 408: Request Timeout

Response 413: Payload Too Large; the request body exceeds the configured limit

Response 415: Unsupported Media Type

Response 422: Unprocessable Entity

Response 200: A session was opened; here is its token pair.

Response 202: The password verified; a second factor is required to finish.

Response 401: Sign-in expired; Exchange refused; ID token refused

Response 409: Address already registered

Response 500: Internal server error

Response 425: Too early

Response 426: Protocol version unsupported

Source

pub async fn complete_oidc_login_request( &self, params: impl Into<CompleteOidcLoginParams>, body: impl Into<OidcCallbackRequest>, ) -> Result<Request<HttpBody>, Error<Infallible>>

The request complete_oidc_login sends, built exactly as it builds it — its URL, headers, credentials and body, the client’s RequestOptions headers and extensions, and its ops::Operation among the extensions — without sending it, for a caller that sends it itself (signing it, pacing it, or over another transport) and hands the response to its decoder. Nothing is replayed after a rejected refreshable credential: that is complete_oidc_login’s own send.

Source

pub async fn decode_complete_oidc_login( &self, response: Response<HttpBody>, ) -> Result<ResponseValue<CompleteOidcLoginResponse>, Error<CompleteOidcLoginError>>

Decode a response to the request complete_oidc_login sends (ops::COMPLETE_OIDC_LOGIN), obtained however the caller sent it, exactly as complete_oidc_login decodes its own: the same status dispatch, typed error, and body limits from this client’s configuration. complete_oidc_login itself sends its request builder’s request through the client’s backend, replays it once where a refreshable credential was rejected, and decodes the response with this.

Source

pub fn complete_oidc_login_url(&self) -> Result<Url, Error<Infallible>>

The URL complete_oidc_login sends its request to, less any apiKey query credential, with the same path and query encoding, resolved against the client’s base URL or the operation’s server override. Nothing is sent and no credential is attached: this is for a URL handed to something that fetches it itself.

Source

pub async fn begin_oidc_device_login( &self, params: impl Into<BeginOidcDeviceLoginParams>, body: impl Into<OidcDeviceRequest>, ) -> Result<ResponseValue<OidcDeviceAuthorizationResponse>, Error<BeginOidcDeviceLoginError>>

Begin a sign-in through the identity provider for a client with no browser of its own.

Unauthenticated, like the authorize, and bounded the same way: the binding’s shape first, then one deployment-wide budget (budgets::OIDC_DEVICE, 429), then the provider, then the store’s own ceiling (503). The provider is asked before anything is written, so a provider without the grant, or an unconfigured deployment, writes nothing. The provider’s device code stays here; the client gets a handle of the server’s own.

Tags: oidc.

Response 400: Bad Request; Binding challenge malformed; Malformed handshake

Response 408: Request Timeout

Response 413: Payload Too Large; the request body exceeds the configured limit

Response 415: Unsupported Media Type

Response 422: Unprocessable Entity

Response 200: OK

Response 404: Device sign-in not offered

Response 429: Too many sign-ins

Response 503: Sign-in capacity reached

Response 500: Internal server error

Response 425: Too early

Response 426: Protocol version unsupported

Source

pub async fn begin_oidc_device_login_request( &self, params: impl Into<BeginOidcDeviceLoginParams>, body: impl Into<OidcDeviceRequest>, ) -> Result<Request<HttpBody>, Error<Infallible>>

The request begin_oidc_device_login sends, built exactly as it builds it — its URL, headers, credentials and body, the client’s RequestOptions headers and extensions, and its ops::Operation among the extensions — without sending it, for a caller that sends it itself (signing it, pacing it, or over another transport) and hands the response to its decoder. Nothing is replayed after a rejected refreshable credential: that is begin_oidc_device_login’s own send.

Source

pub async fn decode_begin_oidc_device_login( &self, response: Response<HttpBody>, ) -> Result<ResponseValue<OidcDeviceAuthorizationResponse>, Error<BeginOidcDeviceLoginError>>

Decode a response to the request begin_oidc_device_login sends (ops::BEGIN_OIDC_DEVICE_LOGIN), obtained however the caller sent it, exactly as begin_oidc_device_login decodes its own: the same status dispatch, typed error, and body limits from this client’s configuration. begin_oidc_device_login itself sends its request builder’s request through the client’s backend, replays it once where a refreshable credential was rejected, and decodes the response with this.

Source

pub fn begin_oidc_device_login_url(&self) -> Result<Url, Error<Infallible>>

The URL begin_oidc_device_login sends its request to, less any apiKey query credential, with the same path and query encoding, resolved against the client’s base URL or the operation’s server override. Nothing is sent and no credential is attached: this is for a URL handed to something that fetches it itself.

Source

pub async fn poll_oidc_device_login( &self, params: impl Into<PollOidcDeviceLoginParams>, body: impl Into<OidcDevicePollRequest>, ) -> Result<ResponseValue<PollOidcDeviceLoginResponse>, Error<PollOidcDeviceLoginError>>

Poll a device authorization once.

The slot is claimed first, atomically: a poll sooner than one interval after the last is 429 error.auth.oidc_device_slow_down and never reaches the provider, so a client polling too fast cannot make this server poll the provider any faster. A due poll checks the client’s binding, then asks the provider once. Every terminal answer — a session, a challenge, a denial, an expiry, a refusal — ends the ceremony; authorization_pending, slow_down and an unreachable provider leave it to be polled again. On success the ceremony is ended before the session is opened, so two polls collecting one approval open one session.

Tags: oidc.

Response 400: Bad Request; Authorization pending; Malformed handshake

Response 408: Request Timeout

Response 413: Payload Too Large; the request body exceeds the configured limit

Response 415: Unsupported Media Type

Response 422: Unprocessable Entity

Response 200: A session was opened; here is its token pair.

Response 202: The password verified; a second factor is required to finish.

Response 429: Slow down

Response 401: Sign-in expired; Sign-in declined; Exchange refused; ID token refused

Response 409: Address already registered

Response 500: Internal server error

Response 425: Too early

Response 426: Protocol version unsupported

Source

pub async fn poll_oidc_device_login_request( &self, params: impl Into<PollOidcDeviceLoginParams>, body: impl Into<OidcDevicePollRequest>, ) -> Result<Request<HttpBody>, Error<Infallible>>

The request poll_oidc_device_login sends, built exactly as it builds it — its URL, headers, credentials and body, the client’s RequestOptions headers and extensions, and its ops::Operation among the extensions — without sending it, for a caller that sends it itself (signing it, pacing it, or over another transport) and hands the response to its decoder. Nothing is replayed after a rejected refreshable credential: that is poll_oidc_device_login’s own send.

Source

pub async fn decode_poll_oidc_device_login( &self, response: Response<HttpBody>, ) -> Result<ResponseValue<PollOidcDeviceLoginResponse>, Error<PollOidcDeviceLoginError>>

Decode a response to the request poll_oidc_device_login sends (ops::POLL_OIDC_DEVICE_LOGIN), obtained however the caller sent it, exactly as poll_oidc_device_login decodes its own: the same status dispatch, typed error, and body limits from this client’s configuration. poll_oidc_device_login itself sends its request builder’s request through the client’s backend, replays it once where a refreshable credential was rejected, and decodes the response with this.

Source

pub fn poll_oidc_device_login_url(&self) -> Result<Url, Error<Infallible>>

The URL poll_oidc_device_login sends its request to, less any apiKey query credential, with the same path and query encoding, resolved against the client’s base URL or the operation’s server override. Nothing is sent and no credential is attached: this is for a URL handed to something that fetches it itself.

Source

pub async fn issue_enrollment_code( &self, params: impl Into<IssueEnrollmentCodeParams>, ) -> Result<ResponseValue<EnrollmentCodeResponse>, Error<IssueEnrollmentCodeError>>

Issue a one-time enrollment code for the caller’s account.

Gated on a recent credential presentation, not merely on a valid session — a stolen token must not be able to enroll a rogue device. See crate::enrollment for exactly how much that gate can mean.

Tags: enrollment.

Response 401: Unauthorized

Response 403: Forbidden; Local authorization required

Response 200: OK

Response 500: Internal server error

Response 425: Too early

Response 413: the request body exceeds the configured limit

Response 400: Bad Request; Malformed handshake

Response 426: Protocol version unsupported

Source

pub async fn issue_enrollment_code_request( &self, params: impl Into<IssueEnrollmentCodeParams>, ) -> Result<Request<HttpBody>, Error<Infallible>>

The request issue_enrollment_code sends, built exactly as it builds it — its URL, headers, credentials and body, the client’s RequestOptions headers and extensions, and its ops::Operation among the extensions — without sending it, for a caller that sends it itself (signing it, pacing it, or over another transport) and hands the response to its decoder. Nothing is replayed after a rejected refreshable credential: that is issue_enrollment_code’s own send.

Source

pub async fn decode_issue_enrollment_code( &self, response: Response<HttpBody>, ) -> Result<ResponseValue<EnrollmentCodeResponse>, Error<IssueEnrollmentCodeError>>

Decode a response to the request issue_enrollment_code sends (ops::ISSUE_ENROLLMENT_CODE), obtained however the caller sent it, exactly as issue_enrollment_code decodes its own: the same status dispatch, typed error, and body limits from this client’s configuration. issue_enrollment_code itself sends its request builder’s request through the client’s backend, replays it once where a refreshable credential was rejected, and decodes the response with this.

Source

pub fn issue_enrollment_code_url(&self) -> Result<Url, Error<Infallible>>

The URL issue_enrollment_code sends its request to, less any apiKey query credential, with the same path and query encoding, resolved against the client’s base URL or the operation’s server override. Nothing is sent and no credential is attached: this is for a URL handed to something that fetches it itself.

Source

pub async fn redeem_enrollment_code( &self, params: impl Into<RedeemEnrollmentCodeParams>, body: impl Into<RedeemRequest>, ) -> Result<ResponseValue<ChannelResponse>, Error<RedeemEnrollmentCodeError>>

Redeem a code for a relay channel.

Unauthenticated, necessarily. Device B has no account, no session and no key material — it is a phone that has just scanned a QR code. The code is the only thing it holds, so the code is the credential.

Tags: enrollment.

Response 400: Bad Request; Malformed handshake

Response 408: Request Timeout

Response 413: Payload Too Large; the request body exceeds the configured limit

Response 415: Unsupported Media Type

Response 422: Unprocessable Entity

Response 200: OK

Response 404: Code refused

Response 429: Too many attempts

Response 500: Internal server error

Response 425: Too early

Response 426: Protocol version unsupported

Source

pub async fn redeem_enrollment_code_request( &self, params: impl Into<RedeemEnrollmentCodeParams>, body: impl Into<RedeemRequest>, ) -> Result<Request<HttpBody>, Error<Infallible>>

The request redeem_enrollment_code sends, built exactly as it builds it — its URL, headers, credentials and body, the client’s RequestOptions headers and extensions, and its ops::Operation among the extensions — without sending it, for a caller that sends it itself (signing it, pacing it, or over another transport) and hands the response to its decoder. Nothing is replayed after a rejected refreshable credential: that is redeem_enrollment_code’s own send.

Source

pub async fn decode_redeem_enrollment_code( &self, response: Response<HttpBody>, ) -> Result<ResponseValue<ChannelResponse>, Error<RedeemEnrollmentCodeError>>

Decode a response to the request redeem_enrollment_code sends (ops::REDEEM_ENROLLMENT_CODE), obtained however the caller sent it, exactly as redeem_enrollment_code decodes its own: the same status dispatch, typed error, and body limits from this client’s configuration. redeem_enrollment_code itself sends its request builder’s request through the client’s backend, replays it once where a refreshable credential was rejected, and decodes the response with this.

Source

pub fn redeem_enrollment_code_url(&self) -> Result<Url, Error<Infallible>>

The URL redeem_enrollment_code sends its request to, less any apiKey query credential, with the same path and query encoding, resolved against the client’s base URL or the operation’s server override. Nothing is sent and no credential is attached: this is for a URL handed to something that fetches it itself.

Source

pub async fn drain_enrollment_channel( &self, channel_id: impl Into<ChannelId59ecf606>, params: impl Into<DrainEnrollmentChannelParams>, ) -> Result<ResponseValue<DrainResponse>, Error<DrainEnrollmentChannelError>>

Take everything pending in one of a channel’s mailboxes.

Destructive: a relayed payload is delivered once. Draining one direction leaves the other untouched, so the two devices do not consume each other’s mail.

Tags: enrollment.

Response 400: Bad Request; Malformed relay request; Malformed handshake

Response 200: OK

Response 404: Channel not found

Response 500: Internal server error

Response 413: the request body exceeds the configured limit

Source

pub async fn drain_enrollment_channel_request( &self, channel_id: impl Into<ChannelId59ecf606>, params: impl Into<DrainEnrollmentChannelParams>, ) -> Result<Request<HttpBody>, Error<Infallible>>

The request drain_enrollment_channel sends, built exactly as it builds it — its URL, headers, credentials and body, the client’s RequestOptions headers and extensions, and its ops::Operation among the extensions — without sending it, for a caller that sends it itself (signing it, pacing it, or over another transport) and hands the response to its decoder. Nothing is replayed after a rejected refreshable credential: that is drain_enrollment_channel’s own send.

Source

pub async fn decode_drain_enrollment_channel( &self, response: Response<HttpBody>, ) -> Result<ResponseValue<DrainResponse>, Error<DrainEnrollmentChannelError>>

Decode a response to the request drain_enrollment_channel sends (ops::DRAIN_ENROLLMENT_CHANNEL), obtained however the caller sent it, exactly as drain_enrollment_channel decodes its own: the same status dispatch, typed error, and body limits from this client’s configuration. drain_enrollment_channel itself sends its request builder’s request through the client’s backend, replays it once where a refreshable credential was rejected, and decodes the response with this.

Source

pub fn drain_enrollment_channel_url( &self, channel_id: impl Into<ChannelId59ecf606>, params: impl Into<DrainEnrollmentChannelParams>, ) -> Result<Url, Error<Infallible>>

The URL drain_enrollment_channel sends its request to, less any apiKey query credential, with the same path and query encoding, resolved against the client’s base URL or the operation’s server override. Nothing is sent and no credential is attached: this is for a URL handed to something that fetches it itself.

Source

pub async fn relay_enrollment_payload( &self, channel_id: impl Into<ChannelIdD183dcc4>, params: impl Into<RelayEnrollmentPayloadParams>, body: impl Into<RelayRequest>, ) -> Result<ResponseValue<()>, Error<RelayEnrollmentPayloadError>>

Append a payload to one of a channel’s two mailboxes.

Unauthenticated and gated by the handle alone. The relay is a dumb pipe by design — see crate::enrollment — and the safety-code check is what defends the ceremony.

Tags: enrollment.

Response 400: Bad Request; Malformed relay request; Malformed handshake

Response 408: Request Timeout

Response 413: Payload Too Large; the request body exceeds the configured limit

Response 415: Unsupported Media Type

Response 422: Unprocessable Entity

Response 204: the request succeeded and there is no content to send

Response 404: Channel not found

Response 500: Internal server error

Response 425: Too early

Response 426: Protocol version unsupported

Source

pub async fn relay_enrollment_payload_request( &self, channel_id: impl Into<ChannelIdD183dcc4>, params: impl Into<RelayEnrollmentPayloadParams>, body: impl Into<RelayRequest>, ) -> Result<Request<HttpBody>, Error<Infallible>>

The request relay_enrollment_payload sends, built exactly as it builds it — its URL, headers, credentials and body, the client’s RequestOptions headers and extensions, and its ops::Operation among the extensions — without sending it, for a caller that sends it itself (signing it, pacing it, or over another transport) and hands the response to its decoder. Nothing is replayed after a rejected refreshable credential: that is relay_enrollment_payload’s own send.

Source

pub async fn decode_relay_enrollment_payload( &self, response: Response<HttpBody>, ) -> Result<ResponseValue<()>, Error<RelayEnrollmentPayloadError>>

Decode a response to the request relay_enrollment_payload sends (ops::RELAY_ENROLLMENT_PAYLOAD), obtained however the caller sent it, exactly as relay_enrollment_payload decodes its own: the same status dispatch, typed error, and body limits from this client’s configuration. relay_enrollment_payload itself sends its request builder’s request through the client’s backend, replays it once where a refreshable credential was rejected, and decodes the response with this.

Source

pub fn relay_enrollment_payload_url( &self, channel_id: impl Into<ChannelIdD183dcc4>, ) -> Result<Url, Error<Infallible>>

The URL relay_enrollment_payload sends its request to, less any apiKey query credential, with the same path and query encoding, resolved against the client’s base URL or the operation’s server override. Nothing is sent and no credential is attached: this is for a URL handed to something that fetches it itself.

Source

pub async fn close_enrollment_channel( &self, channel_id: impl Into<ChannelId>, params: impl Into<CloseEnrollmentChannelParams>, ) -> Result<ResponseValue<()>, Error<CloseEnrollmentChannelError>>

Close a channel and drop both mailboxes with it.

The initiator’s, and authenticated. A close is the one relay operation that is not idempotent from the other device’s point of view — it ends the ceremony — so leaving it on the handle alone would make an abandoned QR code a denial of service. The account is checked against the channel’s recorded initiator, and a channel belonging to another account answers exactly as an unknown one does.

Tags: enrollment.

Response 401: Unauthorized

Response 403: Forbidden

Response 400: Bad Request; Malformed relay request; Malformed handshake

Response 204: the request succeeded and there is no content to send

Response 404: Channel not found

Response 500: Internal server error

Response 425: Too early

Response 413: the request body exceeds the configured limit

Response 426: Protocol version unsupported

Source

pub async fn close_enrollment_channel_request( &self, channel_id: impl Into<ChannelId>, params: impl Into<CloseEnrollmentChannelParams>, ) -> Result<Request<HttpBody>, Error<Infallible>>

The request close_enrollment_channel sends, built exactly as it builds it — its URL, headers, credentials and body, the client’s RequestOptions headers and extensions, and its ops::Operation among the extensions — without sending it, for a caller that sends it itself (signing it, pacing it, or over another transport) and hands the response to its decoder. Nothing is replayed after a rejected refreshable credential: that is close_enrollment_channel’s own send.

Source

pub async fn decode_close_enrollment_channel( &self, response: Response<HttpBody>, ) -> Result<ResponseValue<()>, Error<CloseEnrollmentChannelError>>

Decode a response to the request close_enrollment_channel sends (ops::CLOSE_ENROLLMENT_CHANNEL), obtained however the caller sent it, exactly as close_enrollment_channel decodes its own: the same status dispatch, typed error, and body limits from this client’s configuration. close_enrollment_channel itself sends its request builder’s request through the client’s backend, replays it once where a refreshable credential was rejected, and decodes the response with this.

Source

pub fn close_enrollment_channel_url( &self, channel_id: impl Into<ChannelId>, ) -> Result<Url, Error<Infallible>>

The URL close_enrollment_channel sends its request to, less any apiKey query credential, with the same path and query encoding, resolved against the client’s base URL or the operation’s server override. Nothing is sent and no credential is attached: this is for a URL handed to something that fetches it itself.

Source

pub async fn provision_album( &self, params: impl Into<ProvisionAlbumParams>, body: impl Into<ProvisionAlbumRequest>, ) -> Result<ResponseValue<ProvisionAlbumResponse>, Error<ProvisionAlbumError>>

Bind an album id to the authenticated caller.

Idempotent: the same id from a second device, or after a recovery, is a success that writes nothing.

Tags: albums.

Response 401: Unauthorized

Response 403: Forbidden; Album not available

Response 400: Bad Request; Invalid album id; Malformed handshake

Response 408: Request Timeout

Response 413: Payload Too Large; the request body exceeds the configured limit

Response 415: Unsupported Media Type

Response 422: Unprocessable Entity

Response 201: The album was created and bound to the caller

Response 200: The album id was already provisioned to this account; nothing was written

Response 500: Internal server error

Response 425: Too early

Response 426: Protocol version unsupported

Source

pub async fn provision_album_request( &self, params: impl Into<ProvisionAlbumParams>, body: impl Into<ProvisionAlbumRequest>, ) -> Result<Request<HttpBody>, Error<Infallible>>

The request provision_album sends, built exactly as it builds it — its URL, headers, credentials and body, the client’s RequestOptions headers and extensions, and its ops::Operation among the extensions — without sending it, for a caller that sends it itself (signing it, pacing it, or over another transport) and hands the response to its decoder. Nothing is replayed after a rejected refreshable credential: that is provision_album’s own send.

Source

pub async fn decode_provision_album( &self, response: Response<HttpBody>, ) -> Result<ResponseValue<ProvisionAlbumResponse>, Error<ProvisionAlbumError>>

Decode a response to the request provision_album sends (ops::PROVISION_ALBUM), obtained however the caller sent it, exactly as provision_album decodes its own: the same status dispatch, typed error, and body limits from this client’s configuration. provision_album itself sends its request builder’s request through the client’s backend, replays it once where a refreshable credential was rejected, and decodes the response with this.

Source

pub fn provision_album_url(&self) -> Result<Url, Error<Infallible>>

The URL provision_album sends its request to, less any apiKey query credential, with the same path and query encoding, resolved against the client’s base URL or the operation’s server override. Nothing is sent and no credential is attached: this is for a URL handed to something that fetches it itself.

Source

pub async fn album_upgrade_phase( &self, album_id: impl Into<AlbumId299a08e4>, params: impl Into<AlbumUpgradePhaseParams>, ) -> Result<ResponseValue<UpgradePhaseResponse>, Error<AlbumUpgradePhaseError>>

Read the ceremony’s phase and the drain count.

The one call a proposer polls between steps 2 and 4. in_flight reaching zero is the signal that the tombstone may be committed.

Tags: albums.

Response 401: Unauthorized

Response 403: Forbidden

Response 400: Bad Request; Malformed handshake

Response 200: OK

Response 404: Not found

Response 500: Internal server error

Response 413: the request body exceeds the configured limit

Source

pub async fn album_upgrade_phase_request( &self, album_id: impl Into<AlbumId299a08e4>, params: impl Into<AlbumUpgradePhaseParams>, ) -> Result<Request<HttpBody>, Error<Infallible>>

The request album_upgrade_phase sends, built exactly as it builds it — its URL, headers, credentials and body, the client’s RequestOptions headers and extensions, and its ops::Operation among the extensions — without sending it, for a caller that sends it itself (signing it, pacing it, or over another transport) and hands the response to its decoder. Nothing is replayed after a rejected refreshable credential: that is album_upgrade_phase’s own send.

Source

pub async fn decode_album_upgrade_phase( &self, response: Response<HttpBody>, ) -> Result<ResponseValue<UpgradePhaseResponse>, Error<AlbumUpgradePhaseError>>

Decode a response to the request album_upgrade_phase sends (ops::ALBUM_UPGRADE_PHASE), obtained however the caller sent it, exactly as album_upgrade_phase decodes its own: the same status dispatch, typed error, and body limits from this client’s configuration. album_upgrade_phase itself sends its request builder’s request through the client’s backend, replays it once where a refreshable credential was rejected, and decodes the response with this.

Source

pub fn album_upgrade_phase_url( &self, album_id: impl Into<AlbumId299a08e4>, ) -> Result<Url, Error<Infallible>>

The URL album_upgrade_phase sends its request to, less any apiKey query credential, with the same path and query encoding, resolved against the client’s base URL or the operation’s server override. Nothing is sent and no credential is attached: this is for a URL handed to something that fetches it itself.

Source

pub async fn abort_album_upgrade( &self, album_id: impl Into<AlbumId65d6ee3f>, params: impl Into<AbortAlbumUpgradeParams>, ) -> Result<ResponseValue<UpgradePhaseResponse>, Error<AbortAlbumUpgradeError>>

Abort a ceremony, returning the album to normal operation.

Named by intent_id in the path’s own query so that aborting is a statement about which upgrade — a caller that does not hold the live id gets a 409 rather than the power to cancel somebody else’s ceremony.

Tags: albums.

Response 401: Unauthorized

Response 403: Forbidden

Response 400: Bad Request; Malformed request; Malformed handshake

Response 200: OK

Response 404: Not found

Response 409: Upgrade in flight

Response 500: Internal server error

Response 425: Too early

Response 413: the request body exceeds the configured limit

Response 426: Protocol version unsupported

Source

pub async fn abort_album_upgrade_request( &self, album_id: impl Into<AlbumId65d6ee3f>, params: impl Into<AbortAlbumUpgradeParams>, ) -> Result<Request<HttpBody>, Error<Infallible>>

The request abort_album_upgrade sends, built exactly as it builds it — its URL, headers, credentials and body, the client’s RequestOptions headers and extensions, and its ops::Operation among the extensions — without sending it, for a caller that sends it itself (signing it, pacing it, or over another transport) and hands the response to its decoder. Nothing is replayed after a rejected refreshable credential: that is abort_album_upgrade’s own send.

Source

pub async fn decode_abort_album_upgrade( &self, response: Response<HttpBody>, ) -> Result<ResponseValue<UpgradePhaseResponse>, Error<AbortAlbumUpgradeError>>

Decode a response to the request abort_album_upgrade sends (ops::ABORT_ALBUM_UPGRADE), obtained however the caller sent it, exactly as abort_album_upgrade decodes its own: the same status dispatch, typed error, and body limits from this client’s configuration. abort_album_upgrade itself sends its request builder’s request through the client’s backend, replays it once where a refreshable credential was rejected, and decodes the response with this.

Source

pub fn abort_album_upgrade_url( &self, album_id: impl Into<AlbumId65d6ee3f>, params: impl Into<AbortAlbumUpgradeParams>, ) -> Result<Url, Error<Infallible>>

The URL abort_album_upgrade sends its request to, less any apiKey query credential, with the same path and query encoding, resolved against the client’s base URL or the operation’s server override. Nothing is sent and no credential is attached: this is for a URL handed to something that fetches it itself.

Source

pub async fn publish_album_roster( &self, album_id: impl Into<AlbumId9075dd84>, params: impl Into<PublishAlbumRosterParams>, body: impl Into<RosterRequest>, ) -> Result<ResponseValue<RosterResponse>, Error<PublishAlbumRosterError>>

Publish the caller’s roster for one of their albums.

Tags: albums.

Response 401: Unauthorized

Response 403: Forbidden; Attester not authorized

Response 400: Bad Request; Malformed roster; Roster version leap; Malformed handshake

Response 408: Request Timeout

Response 413: Payload Too Large; the request body exceeds the configured limit

Response 415: Unsupported Media Type

Response 422: Unprocessable Entity

Response 200: OK

Response 404: Not found

Response 409: Roster stale

Response 500: Internal server error

Response 425: Too early

Response 426: Protocol version unsupported

Source

pub async fn publish_album_roster_request( &self, album_id: impl Into<AlbumId9075dd84>, params: impl Into<PublishAlbumRosterParams>, body: impl Into<RosterRequest>, ) -> Result<Request<HttpBody>, Error<Infallible>>

The request publish_album_roster sends, built exactly as it builds it — its URL, headers, credentials and body, the client’s RequestOptions headers and extensions, and its ops::Operation among the extensions — without sending it, for a caller that sends it itself (signing it, pacing it, or over another transport) and hands the response to its decoder. Nothing is replayed after a rejected refreshable credential: that is publish_album_roster’s own send.

Source

pub async fn decode_publish_album_roster( &self, response: Response<HttpBody>, ) -> Result<ResponseValue<RosterResponse>, Error<PublishAlbumRosterError>>

Decode a response to the request publish_album_roster sends (ops::PUBLISH_ALBUM_ROSTER), obtained however the caller sent it, exactly as publish_album_roster decodes its own: the same status dispatch, typed error, and body limits from this client’s configuration. publish_album_roster itself sends its request builder’s request through the client’s backend, replays it once where a refreshable credential was rejected, and decodes the response with this.

Source

pub fn publish_album_roster_url( &self, album_id: impl Into<AlbumId9075dd84>, ) -> Result<Url, Error<Infallible>>

The URL publish_album_roster sends its request to, less any apiKey query credential, with the same path and query encoding, resolved against the client’s base URL or the operation’s server override. Nothing is sent and no credential is attached: this is for a URL handed to something that fetches it itself.

Source

pub async fn cancel_upload( &self, id: impl Into<Id>, params: impl Into<CancelUploadParams>, ) -> Result<ResponseValue<()>, Error<CancelUploadError>>

Cancel a session: its record, its accepted chunks and its staged bytes, together.

Refused while finalization is running — it is not interruptible — and refused once the session is terminal, because there is nothing left to cancel and the receipt is what a client should read instead.

Tags: upload.

Response 401: Unauthorized

Response 403: Forbidden

Response 400: Bad Request; Malformed handshake

Response 204: the request succeeded and there is no content to send

Response 404: Upload session not found

Response 409: Session not active

Response 503: Service unavailable

Response 425: Too early

Response 413: the request body exceeds the configured limit

Response 426: Protocol version unsupported

Source

pub async fn cancel_upload_request( &self, id: impl Into<Id>, params: impl Into<CancelUploadParams>, ) -> Result<Request<HttpBody>, Error<Infallible>>

The request cancel_upload sends, built exactly as it builds it — its URL, headers, credentials and body, the client’s RequestOptions headers and extensions, and its ops::Operation among the extensions — without sending it, for a caller that sends it itself (signing it, pacing it, or over another transport) and hands the response to its decoder. Nothing is replayed after a rejected refreshable credential: that is cancel_upload’s own send.

Source

pub async fn decode_cancel_upload( &self, response: Response<HttpBody>, ) -> Result<ResponseValue<()>, Error<CancelUploadError>>

Decode a response to the request cancel_upload sends (ops::CANCEL_UPLOAD), obtained however the caller sent it, exactly as cancel_upload decodes its own: the same status dispatch, typed error, and body limits from this client’s configuration. cancel_upload itself sends its request builder’s request through the client’s backend, replays it once where a refreshable credential was rejected, and decodes the response with this.

Source

pub fn cancel_upload_url( &self, id: impl Into<Id>, ) -> Result<Url, Error<Infallible>>

The URL cancel_upload sends its request to, less any apiKey query credential, with the same path and query encoding, resolved against the client’s base URL or the operation’s server override. Nothing is sent and no credential is attached: this is for a URL handed to something that fetches it itself.

Source

pub async fn head_upload( &self, id: impl Into<Id19afdd3c>, params: impl Into<HeadUploadParams>, ) -> Result<ResponseValue<()>, Error<HeadUploadError>>

Report a session’s progress and state.

The resumption primitive: a client that lost a connection, an acknowledgement, or a process asks here and learns the authoritative offset, the declared length and the session’s state. The answer carries no body — HTTP forbids one on HEAD, which is why the protocol puts all three on headers.

A session that holds every byte and whose finalization nobody claimed has its finalization started before it is reported: a client resuming at an offset equal to the size sends nothing more, so this may be the last request it makes about the session. The finalization is never awaited — the answer is the state as it stands, waiting_for_processing — and the client polls this operation, with backoff, until the state is terminal. A failed_processing state carries the failure’s error.* code in X-Capsule-Upload-Error.

Tags: upload.

Response 401: Unauthorized

Response 403: Forbidden

Response 400: Bad Request; Malformed handshake

Response 200: Progress and state on X-Capsule-* headers, no body

Response 404: Upload session not found

Response 503: Service unavailable

Response 413: the request body exceeds the configured limit

Source

pub async fn head_upload_request( &self, id: impl Into<Id19afdd3c>, params: impl Into<HeadUploadParams>, ) -> Result<Request<HttpBody>, Error<Infallible>>

The request head_upload sends, built exactly as it builds it — its URL, headers, credentials and body, the client’s RequestOptions headers and extensions, and its ops::Operation among the extensions — without sending it, for a caller that sends it itself (signing it, pacing it, or over another transport) and hands the response to its decoder. Nothing is replayed after a rejected refreshable credential: that is head_upload’s own send.

Source

pub async fn decode_head_upload( &self, response: Response<HttpBody>, ) -> Result<ResponseValue<()>, Error<HeadUploadError>>

Decode a response to the request head_upload sends (ops::HEAD_UPLOAD), obtained however the caller sent it, exactly as head_upload decodes its own: the same status dispatch, typed error, and body limits from this client’s configuration. head_upload itself sends its request builder’s request through the client’s backend, replays it once where a refreshable credential was rejected, and decodes the response with this.

Source

pub fn head_upload_url( &self, id: impl Into<Id19afdd3c>, ) -> Result<Url, Error<Infallible>>

The URL head_upload sends its request to, less any apiKey query credential, with the same path and query encoding, resolved against the client’s base URL or the operation’s server override. Nothing is sent and no credential is attached: this is for a URL handed to something that fetches it itself.

Source

pub async fn append_chunk( &self, id: impl Into<Id4da2f190>, params: impl Into<AppendChunkParams>, body: impl Into<HttpBody>, ) -> Result<ResponseValue<()>, Error<AppendChunkError>>

Write one range of the blob, and finalize when the committed set reaches the declared size.

Every rule the chunk contract fixes is checked before a byte is written — the checksum against the received bytes first, so a chunk corrupted in transit persists nothing, then admission against the committed set and the ranges in flight (chunk::admit).

Tags: upload.

Response 401: Unauthorized

Response 403: Forbidden

Response 400: Bad Request; Malformed request; Invalid chunk; Malformed handshake

Response 415: Unsupported media type

Response 408: Request timeout

Response 204: the request succeeded and there is no content to send

Response 404: Upload session not found

Response 409: Range conflict; Too many ranges in flight; Too fragmented; Session not active

Response 413: Chunk too large; the request body exceeds the configured limit

Response 500: Internal server error

Response 429: Too many requests

Response 507: Insufficient storage

Response 503: Service unavailable

Response 425: Too early

Response 426: Protocol version unsupported The request body is a types::AppendChunkBody (bytes::Bytes) or a Vec<u8>, moved in without a copy, or an HttpBody::wrap stream, sent as it is read and never replayed.

Source

pub async fn append_chunk_request( &self, id: impl Into<Id4da2f190>, params: impl Into<AppendChunkParams>, body: impl Into<HttpBody>, ) -> Result<Request<HttpBody>, Error<Infallible>>

The request append_chunk sends, built exactly as it builds it — its URL, headers, credentials and body, the client’s RequestOptions headers and extensions, and its ops::Operation among the extensions — without sending it, for a caller that sends it itself (signing it, pacing it, or over another transport) and hands the response to its decoder. Nothing is replayed after a rejected refreshable credential: that is append_chunk’s own send.

Source

pub async fn decode_append_chunk( &self, response: Response<HttpBody>, ) -> Result<ResponseValue<()>, Error<AppendChunkError>>

Decode a response to the request append_chunk sends (ops::APPEND_CHUNK), obtained however the caller sent it, exactly as append_chunk decodes its own: the same status dispatch, typed error, and body limits from this client’s configuration. append_chunk itself sends its request builder’s request through the client’s backend, replays it once where a refreshable credential was rejected, and decodes the response with this.

Source

pub fn append_chunk_url( &self, id: impl Into<Id4da2f190>, ) -> Result<Url, Error<Infallible>>

The URL append_chunk sends its request to, less any apiKey query credential, with the same path and query encoding, resolved against the client’s base URL or the operation’s server override. Nothing is sent and no credential is attached: this is for a URL handed to something that fetches it itself.

Source

pub async fn verify_storage( &self, params: impl Into<VerifyStorageParams>, body: impl Into<StorageVerifyRequest>, ) -> Result<ResponseValue<StorageVerifyResponse>, Error<VerifyStorageError>>

Confirm that the server holds the copies a client is about to stop holding.

A pure read: it writes no blob, no index row and no verdict. Soundness against a racing collection comes from the standing GC grace window rather than from a per-request lease, which is why nothing here takes one.

Tags: storage.

Response 401: Unauthorized

Response 403: Forbidden

Response 400: Bad Request; Invalid request; Malformed handshake

Response 408: Request Timeout

Response 413: Payload Too Large; the request body exceeds the configured limit

Response 415: Unsupported Media Type

Response 422: Unprocessable Entity

Response 200: OK

Response 429: Too many requests

Response 500: Internal server error

Response 425: Too early

Response 426: Protocol version unsupported

Source

pub async fn verify_storage_request( &self, params: impl Into<VerifyStorageParams>, body: impl Into<StorageVerifyRequest>, ) -> Result<Request<HttpBody>, Error<Infallible>>

The request verify_storage sends, built exactly as it builds it — its URL, headers, credentials and body, the client’s RequestOptions headers and extensions, and its ops::Operation among the extensions — without sending it, for a caller that sends it itself (signing it, pacing it, or over another transport) and hands the response to its decoder. Nothing is replayed after a rejected refreshable credential: that is verify_storage’s own send.

Source

pub async fn decode_verify_storage( &self, response: Response<HttpBody>, ) -> Result<ResponseValue<StorageVerifyResponse>, Error<VerifyStorageError>>

Decode a response to the request verify_storage sends (ops::VERIFY_STORAGE), obtained however the caller sent it, exactly as verify_storage decodes its own: the same status dispatch, typed error, and body limits from this client’s configuration. verify_storage itself sends its request builder’s request through the client’s backend, replays it once where a refreshable credential was rejected, and decodes the response with this.

Source

pub fn verify_storage_url(&self) -> Result<Url, Error<Infallible>>

The URL verify_storage sends its request to, less any apiKey query credential, with the same path and query encoding, resolved against the client’s base URL or the operation’s server override. Nothing is sent and no credential is attached: this is for a URL handed to something that fetches it itself.

Source

pub async fn reannounce_manifests( &self, params: impl Into<ReannounceManifestsParams>, body: impl Into<ReannounceRequest>, ) -> Result<ResponseValue<ReannounceResponse>, Error<ReannounceManifestsError>>

Restore index rows from the signed manifests a client holds, after a rebuild lost them.

Idempotent per manifest: a row restored once is already_indexed the second time, and nothing is written again.

Tags: sync.

Response 401: Unauthorized

Response 403: Forbidden

Response 400: Bad Request; Invalid request; Malformed handshake

Response 408: Request Timeout

Response 413: Payload Too Large; the request body exceeds the configured limit

Response 415: Unsupported Media Type

Response 422: Unprocessable Entity

Response 200: OK

Response 500: Internal server error

Response 425: Too early

Response 426: Protocol version unsupported

Source

pub async fn reannounce_manifests_request( &self, params: impl Into<ReannounceManifestsParams>, body: impl Into<ReannounceRequest>, ) -> Result<Request<HttpBody>, Error<Infallible>>

The request reannounce_manifests sends, built exactly as it builds it — its URL, headers, credentials and body, the client’s RequestOptions headers and extensions, and its ops::Operation among the extensions — without sending it, for a caller that sends it itself (signing it, pacing it, or over another transport) and hands the response to its decoder. Nothing is replayed after a rejected refreshable credential: that is reannounce_manifests’s own send.

Source

pub async fn decode_reannounce_manifests( &self, response: Response<HttpBody>, ) -> Result<ResponseValue<ReannounceResponse>, Error<ReannounceManifestsError>>

Decode a response to the request reannounce_manifests sends (ops::REANNOUNCE_MANIFESTS), obtained however the caller sent it, exactly as reannounce_manifests decodes its own: the same status dispatch, typed error, and body limits from this client’s configuration. reannounce_manifests itself sends its request builder’s request through the client’s backend, replays it once where a refreshable credential was rejected, and decodes the response with this.

Source

pub fn reannounce_manifests_url(&self) -> Result<Url, Error<Infallible>>

The URL reannounce_manifests sends its request to, less any apiKey query credential, with the same path and query encoding, resolved against the client’s base URL or the operation’s server override. Nothing is sent and no credential is attached: this is for a URL handed to something that fetches it itself.

Source

pub async fn revoke_share( &self, opaque_id: impl Into<OpaqueId7bbe66b2>, params: impl Into<RevokeShareParams>, ) -> Result<ResponseValue<()>, Error<RevokeShareError>>

Revoke one of the caller’s links.

Idempotent from the caller’s side and indistinguishable: a link that was never theirs, a link that does not exist, and a link they already revoked are all 204. Revocation is the one operation where saying “there was nothing to revoke” would be a lookup.

Tags: shares.

Response 401: Unauthorized

Response 403: Forbidden; Quota grace expired; Quota exceeded; Quota suspended

Response 400: Bad Request; Malformed share link; Malformed handshake

Response 204: the request succeeded and there is no content to send

Response 500: Internal server error

Response 425: Too early

Response 413: the request body exceeds the configured limit

Response 426: Protocol version unsupported

Source

pub async fn revoke_share_request( &self, opaque_id: impl Into<OpaqueId7bbe66b2>, params: impl Into<RevokeShareParams>, ) -> Result<Request<HttpBody>, Error<Infallible>>

The request revoke_share sends, built exactly as it builds it — its URL, headers, credentials and body, the client’s RequestOptions headers and extensions, and its ops::Operation among the extensions — without sending it, for a caller that sends it itself (signing it, pacing it, or over another transport) and hands the response to its decoder. Nothing is replayed after a rejected refreshable credential: that is revoke_share’s own send.

Source

pub async fn decode_revoke_share( &self, response: Response<HttpBody>, ) -> Result<ResponseValue<()>, Error<RevokeShareError>>

Decode a response to the request revoke_share sends (ops::REVOKE_SHARE), obtained however the caller sent it, exactly as revoke_share decodes its own: the same status dispatch, typed error, and body limits from this client’s configuration. revoke_share itself sends its request builder’s request through the client’s backend, replays it once where a refreshable credential was rejected, and decodes the response with this.

Source

pub fn revoke_share_url( &self, opaque_id: impl Into<OpaqueId7bbe66b2>, ) -> Result<Url, Error<Infallible>>

The URL revoke_share sends its request to, less any apiKey query credential, with the same path and query encoding, resolved against the client’s base URL or the operation’s server override. Nothing is sent and no credential is attached: this is for a URL handed to something that fetches it itself.

Provision an upload link.

A link is metadata growth: an owner past their quota grace window is refused 403 error.quota.grace_locked, and one whose quota the operator suspended 403 error.quota.suspended.

Tags: drops.

Response 401: Unauthorized

Response 403: Forbidden; Quota grace expired; Quota suspended

Response 400: Bad Request; Malformed upload link; Malformed handshake

Response 408: Request Timeout

Response 413: Payload Too Large; the request body exceeds the configured limit

Response 415: Unsupported Media Type

Response 422: Unprocessable Entity

Response 201: The upload link is provisioned and accepting drops

Response 500: Internal server error

Response 425: Too early

Response 426: Protocol version unsupported

The request provision_link sends, built exactly as it builds it — its URL, headers, credentials and body, the client’s RequestOptions headers and extensions, and its ops::Operation among the extensions — without sending it, for a caller that sends it itself (signing it, pacing it, or over another transport) and hands the response to its decoder. Nothing is replayed after a rejected refreshable credential: that is provision_link’s own send.

Decode a response to the request provision_link sends (ops::PROVISION_LINK), obtained however the caller sent it, exactly as provision_link decodes its own: the same status dispatch, typed error, and body limits from this client’s configuration. provision_link itself sends its request builder’s request through the client’s backend, replays it once where a refreshable credential was rejected, and decodes the response with this.

The URL provision_link sends its request to, less any apiKey query credential, with the same path and query encoding, resolved against the client’s base URL or the operation’s server override. Nothing is sent and no credential is attached: this is for a URL handed to something that fetches it itself.

Revoke one of the caller’s links.

Never consults the quota: a revocation frees nothing but is admitted in every state, suspended and past the grace window included.

Indistinguishable and idempotent, for the same reason a share revocation is: saying “there was nothing to revoke” would be a lookup.

Tags: drops.

Response 401: Unauthorized

Response 403: Forbidden; Quota grace expired; Quota suspended

Response 400: Bad Request; Malformed upload link; Malformed handshake

Response 204: the request succeeded and there is no content to send

Response 500: Internal server error

Response 425: Too early

Response 413: the request body exceeds the configured limit

Response 426: Protocol version unsupported

The request revoke_link sends, built exactly as it builds it — its URL, headers, credentials and body, the client’s RequestOptions headers and extensions, and its ops::Operation among the extensions — without sending it, for a caller that sends it itself (signing it, pacing it, or over another transport) and hands the response to its decoder. Nothing is replayed after a rejected refreshable credential: that is revoke_link’s own send.

Decode a response to the request revoke_link sends (ops::REVOKE_LINK), obtained however the caller sent it, exactly as revoke_link decodes its own: the same status dispatch, typed error, and body limits from this client’s configuration. revoke_link itself sends its request builder’s request through the client’s backend, replays it once where a refreshable credential was rejected, and decodes the response with this.

The URL revoke_link sends its request to, less any apiKey query credential, with the same path and query encoding, resolved against the client’s base URL or the operation’s server override. Nothing is sent and no credential is attached: this is for a URL handed to something that fetches it itself.

Source

pub async fn adopt_drop( &self, drop_id: impl Into<DropIdAc2383a4>, params: impl Into<AdoptDropParams>, body: impl Into<AdoptRequest>, ) -> Result<ResponseValue<AdoptResponse>, Error<AdoptDropError>>

Adopt a pending drop into an album.

Invariant 32. The manifest re-runs the create battery — a drop that skipped it would be the one write on this server that entered an album unvalidated — and its ciphertext_hash must name a blob in the caller’s own inbox, which is what stops an adoption from minting an asset over somebody else’s bytes.

The row is claimed, written, then settled. Across two ports there is no transaction, and the two failure directions are not equal: writing first and deleting after can duplicate a photo, taking first and failing to write loses one. A claim leaves a crash visible in the owner’s own inbox instead, marked adopting.

Tags: drops.

Response 401: Unauthorized

Response 403: Forbidden

Response 400: Bad Request; Adoption refused; Malformed handshake

Response 408: Request Timeout

Response 413: Payload Too Large; the request body exceeds the configured limit

Response 415: Unsupported Media Type

Response 422: Unprocessable Entity

Response 200: OK

Response 404: Not found

Response 500: Internal server error

Response 425: Too early

Response 426: Protocol version unsupported

Source

pub async fn adopt_drop_request( &self, drop_id: impl Into<DropIdAc2383a4>, params: impl Into<AdoptDropParams>, body: impl Into<AdoptRequest>, ) -> Result<Request<HttpBody>, Error<Infallible>>

The request adopt_drop sends, built exactly as it builds it — its URL, headers, credentials and body, the client’s RequestOptions headers and extensions, and its ops::Operation among the extensions — without sending it, for a caller that sends it itself (signing it, pacing it, or over another transport) and hands the response to its decoder. Nothing is replayed after a rejected refreshable credential: that is adopt_drop’s own send.

Source

pub async fn decode_adopt_drop( &self, response: Response<HttpBody>, ) -> Result<ResponseValue<AdoptResponse>, Error<AdoptDropError>>

Decode a response to the request adopt_drop sends (ops::ADOPT_DROP), obtained however the caller sent it, exactly as adopt_drop decodes its own: the same status dispatch, typed error, and body limits from this client’s configuration. adopt_drop itself sends its request builder’s request through the client’s backend, replays it once where a refreshable credential was rejected, and decodes the response with this.

Source

pub fn adopt_drop_url( &self, drop_id: impl Into<DropIdAc2383a4>, ) -> Result<Url, Error<Infallible>>

The URL adopt_drop sends its request to, less any apiKey query credential, with the same path and query encoding, resolved against the client’s base URL or the operation’s server override. Nothing is sent and no credential is attached: this is for a URL handed to something that fetches it itself.

Source

pub async fn discard_drop( &self, drop_id: impl Into<DropId>, params: impl Into<DiscardDropParams>, ) -> Result<ResponseValue<()>, Error<DiscardDropError>>

Discard a pending drop.

The bytes become unreferenced and the collector reclaims them; the link’s cap is not refunded, because the drop did happen — a guest deposited a file and the owner chose not to keep it, which is not the same as a link slot never having been used.

Tags: drops.

Response 401: Unauthorized

Response 403: Forbidden

Response 400: Bad Request; Malformed handshake

Response 204: the request succeeded and there is no content to send

Response 404: Not found

Response 500: Internal server error

Response 425: Too early

Response 413: the request body exceeds the configured limit

Response 426: Protocol version unsupported

Source

pub async fn discard_drop_request( &self, drop_id: impl Into<DropId>, params: impl Into<DiscardDropParams>, ) -> Result<Request<HttpBody>, Error<Infallible>>

The request discard_drop sends, built exactly as it builds it — its URL, headers, credentials and body, the client’s RequestOptions headers and extensions, and its ops::Operation among the extensions — without sending it, for a caller that sends it itself (signing it, pacing it, or over another transport) and hands the response to its decoder. Nothing is replayed after a rejected refreshable credential: that is discard_drop’s own send.

Source

pub async fn decode_discard_drop( &self, response: Response<HttpBody>, ) -> Result<ResponseValue<()>, Error<DiscardDropError>>

Decode a response to the request discard_drop sends (ops::DISCARD_DROP), obtained however the caller sent it, exactly as discard_drop decodes its own: the same status dispatch, typed error, and body limits from this client’s configuration. discard_drop itself sends its request builder’s request through the client’s backend, replays it once where a refreshable credential was rejected, and decodes the response with this.

Source

pub fn discard_drop_url( &self, drop_id: impl Into<DropId>, ) -> Result<Url, Error<Infallible>>

The URL discard_drop sends its request to, less any apiKey query credential, with the same path and query encoding, resolved against the client’s base URL or the operation’s server override. Nothing is sent and no credential is attached: this is for a URL handed to something that fetches it itself.

Source

pub async fn create_upload( &self, params: impl Into<CreateUploadParams>, body: impl Into<CreateUploadRequest>, ) -> Result<ResponseValue<CreateUploadResponse>, Error<CreateUploadError>>

Open an upload session for one blob of an asset bundle.

Runs the refuse-by-default envelope battery — invariants 1–8 and the top-level↔envelope consistency family — before anything is written, then stages the session’s file and records the session. A request whose (owner, hash, album) tuple already has an active session gets that session back rather than a second one.

The quota is checked here and nowhere later: a declared size that would cross the hard limit is 403 error.quota.exceeded, and an account whose quota the operator suspended is 403 error.quota.suspended, both before anything is charged or staged.

A finalized (owner, hash, album) is 409 error.upload.duplicate_blob naming the asset that holds the bytes. When the request is a create for a different asset, the server first records the existing blob against the requesting asset — custody-receipted and ledgered as a finalization is — so the merge the client performs on the 409 leaves both assets holding a reference, and purging one cannot collect bytes the other depends on.

Tags: upload.

Response 401: Unauthorized

Response 403: Forbidden; Account suspended; Upload not permitted; Quota exceeded; Quota suspended

Response 400: Bad Request; Invalid upload; Malformed handshake

Response 408: Request Timeout

Response 413: Payload Too Large; File too large; the request body exceeds the configured limit

Response 415: Unsupported Media Type

Response 422: Unprocessable Entity

Response 201: Upload session created

Response 200: The active session for these bytes, to resume

Response 409: Album quiescing; Duplicate blob

Response 426: Protocol version unsupported

Response 429: Too many requests

Response 507: Insufficient storage

Response 503: Service unavailable

Response 425: Too early

Source

pub async fn create_upload_request( &self, params: impl Into<CreateUploadParams>, body: impl Into<CreateUploadRequest>, ) -> Result<Request<HttpBody>, Error<Infallible>>

The request create_upload sends, built exactly as it builds it — its URL, headers, credentials and body, the client’s RequestOptions headers and extensions, and its ops::Operation among the extensions — without sending it, for a caller that sends it itself (signing it, pacing it, or over another transport) and hands the response to its decoder. Nothing is replayed after a rejected refreshable credential: that is create_upload’s own send.

Source

pub async fn decode_create_upload( &self, response: Response<HttpBody>, ) -> Result<ResponseValue<CreateUploadResponse>, Error<CreateUploadError>>

Decode a response to the request create_upload sends (ops::CREATE_UPLOAD), obtained however the caller sent it, exactly as create_upload decodes its own: the same status dispatch, typed error, and body limits from this client’s configuration. create_upload itself sends its request builder’s request through the client’s backend, replays it once where a refreshable credential was rejected, and decodes the response with this.

Source

pub fn create_upload_url(&self) -> Result<Url, Error<Infallible>>

The URL create_upload sends its request to, less any apiKey query credential, with the same path and query encoding, resolved against the client’s base URL or the operation’s server override. Nothing is sent and no credential is attached: this is for a URL handed to something that fetches it itself.

Source

pub async fn album_lifecycle_op( &self, album_id: impl Into<AlbumIdEcef77c6>, params: impl Into<AlbumLifecycleOpParams>, body: impl Into<OpRequest>, ) -> Result<ResponseValue<OpResponse>, Error<AlbumLifecycleOpError>>

Apply one signed lifecycle manifest to an album’s asset.

The whole battery runs before anything is written, and a rejection writes nothing — including the blobs the bundle carries, which are stored only after the manifest has passed every check the server can make without a key.

An op carrying a metadata blob is metadata growth: past the quota grace window it is 403 error.quota.grace_locked, and while the operator has suspended the account’s quota 403 error.quota.suspended. A delete or trash-restore is never refused by quota.

A trash-restore the server accepts at or after the tombstone’s signed retention_until is 409 error.upload.retention_elapsed: the trash recovers an asset only within its window.

Tags: lifecycle.

Response 401: Unauthorized

Response 403: Forbidden; Account suspended; Quota grace expired; Quota suspended

Response 400: Bad Request; Invalid request; Malformed handshake

Response 408: Request Timeout

Response 413: Payload Too Large; the request body exceeds the configured limit

Response 415: Unsupported Media Type

Response 422: Unprocessable Entity

Response 200: OK

Response 426: Upgrade required; Protocol version unsupported

Response 409: Stale revival; Retention elapsed

Response 500: Internal server error

Response 425: Too early

Source

pub async fn album_lifecycle_op_request( &self, album_id: impl Into<AlbumIdEcef77c6>, params: impl Into<AlbumLifecycleOpParams>, body: impl Into<OpRequest>, ) -> Result<Request<HttpBody>, Error<Infallible>>

The request album_lifecycle_op sends, built exactly as it builds it — its URL, headers, credentials and body, the client’s RequestOptions headers and extensions, and its ops::Operation among the extensions — without sending it, for a caller that sends it itself (signing it, pacing it, or over another transport) and hands the response to its decoder. Nothing is replayed after a rejected refreshable credential: that is album_lifecycle_op’s own send.

Source

pub async fn decode_album_lifecycle_op( &self, response: Response<HttpBody>, ) -> Result<ResponseValue<OpResponse>, Error<AlbumLifecycleOpError>>

Decode a response to the request album_lifecycle_op sends (ops::ALBUM_LIFECYCLE_OP), obtained however the caller sent it, exactly as album_lifecycle_op decodes its own: the same status dispatch, typed error, and body limits from this client’s configuration. album_lifecycle_op itself sends its request builder’s request through the client’s backend, replays it once where a refreshable credential was rejected, and decodes the response with this.

Source

pub fn album_lifecycle_op_url( &self, album_id: impl Into<AlbumIdEcef77c6>, ) -> Result<Url, Error<Infallible>>

The URL album_lifecycle_op sends its request to, less any apiKey query credential, with the same path and query encoding, resolved against the client’s base URL or the operation’s server override. Nothing is sent and no credential is attached: this is for a URL handed to something that fetches it itself.

Source

pub async fn issue_share( &self, params: impl Into<IssueShareParams>, body: impl Into<IssueShareRequest>, ) -> Result<ResponseValue<IssueShareResponse>, Error<IssueShareError>>

Register a share link the caller’s client has issued.

A link is metadata growth: an account past its quota grace window is refused 403 error.quota.grace_locked, and one whose quota the operator suspended 403 error.quota.suspended.

Tags: shares.

Response 401: Unauthorized

Response 403: Forbidden; Quota grace expired; Quota exceeded; Quota suspended

Response 400: Bad Request; Malformed share link; Malformed handshake

Response 408: Request Timeout

Response 413: Payload Too Large; the request body exceeds the configured limit

Response 415: Unsupported Media Type

Response 422: Unprocessable Entity

Response 201: The share link is registered and servable

Response 500: Internal server error

Response 425: Too early

Response 426: Protocol version unsupported

Source

pub async fn issue_share_request( &self, params: impl Into<IssueShareParams>, body: impl Into<IssueShareRequest>, ) -> Result<Request<HttpBody>, Error<Infallible>>

The request issue_share sends, built exactly as it builds it — its URL, headers, credentials and body, the client’s RequestOptions headers and extensions, and its ops::Operation among the extensions — without sending it, for a caller that sends it itself (signing it, pacing it, or over another transport) and hands the response to its decoder. Nothing is replayed after a rejected refreshable credential: that is issue_share’s own send.

Source

pub async fn decode_issue_share( &self, response: Response<HttpBody>, ) -> Result<ResponseValue<IssueShareResponse>, Error<IssueShareError>>

Decode a response to the request issue_share sends (ops::ISSUE_SHARE), obtained however the caller sent it, exactly as issue_share decodes its own: the same status dispatch, typed error, and body limits from this client’s configuration. issue_share itself sends its request builder’s request through the client’s backend, replays it once where a refreshable credential was rejected, and decodes the response with this.

Source

pub fn issue_share_url(&self) -> Result<Url, Error<Infallible>>

The URL issue_share sends its request to, less any apiKey query credential, with the same path and query encoding, resolved against the client’s base URL or the operation’s server override. Nothing is sent and no credential is attached: this is for a URL handed to something that fetches it itself.

Source

pub async fn issue_capability( &self, album_id: impl Into<AlbumId>, params: impl Into<IssueCapabilityParams>, body: impl Into<MintCapabilityRequest>, ) -> Result<ResponseValue<MintedCapabilityResponse>, Error<IssueCapabilityError>>

Mint a capability letting one peer server pull one album.

The token is in the response and nowhere else: this server keeps the record, never the credential.

Answers 404 error.federation.not_configured when this deployment does not federate — FEDERATION_ENABLED is off, which is the default — before the credential is read or a store is touched.

Tags: federation.

Response 401: Unauthorized

Response 403: Forbidden; Server blocked

Response 400: Bad Request; Malformed request; Malformed handshake

Response 408: Request Timeout

Response 413: Payload Too Large; the request body exceeds the configured limit

Response 415: Unsupported Media Type

Response 422: Unprocessable Entity

Response 201: The capability was minted

Response 404: Not found

Response 409: Member not on roster

Response 429: Rate budget exceeded

Response 500: Internal server error

Response 425: Too early

Response 426: Protocol version unsupported

Source

pub async fn issue_capability_request( &self, album_id: impl Into<AlbumId>, params: impl Into<IssueCapabilityParams>, body: impl Into<MintCapabilityRequest>, ) -> Result<Request<HttpBody>, Error<Infallible>>

The request issue_capability sends, built exactly as it builds it — its URL, headers, credentials and body, the client’s RequestOptions headers and extensions, and its ops::Operation among the extensions — without sending it, for a caller that sends it itself (signing it, pacing it, or over another transport) and hands the response to its decoder. Nothing is replayed after a rejected refreshable credential: that is issue_capability’s own send.

Source

pub async fn decode_issue_capability( &self, response: Response<HttpBody>, ) -> Result<ResponseValue<MintedCapabilityResponse>, Error<IssueCapabilityError>>

Decode a response to the request issue_capability sends (ops::ISSUE_CAPABILITY), obtained however the caller sent it, exactly as issue_capability decodes its own: the same status dispatch, typed error, and body limits from this client’s configuration. issue_capability itself sends its request builder’s request through the client’s backend, replays it once where a refreshable credential was rejected, and decodes the response with this.

Source

pub fn issue_capability_url( &self, album_id: impl Into<AlbumId>, ) -> Result<Url, Error<Infallible>>

The URL issue_capability sends its request to, less any apiKey query credential, with the same path and query encoding, resolved against the client’s base URL or the operation’s server override. Nothing is sent and no credential is attached: this is for a URL handed to something that fetches it itself.

Source

pub async fn revoke_capability( &self, album_id: impl Into<AlbumIdF5595b0f>, jti: impl Into<Jti>, params: impl Into<RevokeCapabilityParams>, ) -> Result<ResponseValue<()>, Error<RevokeCapabilityError>>

Revoke one capability of one album.

Idempotent, and silent about what it did: a jti that is not a live capability of this album — never issued, already revoked, or another album’s — is the same 204 a revocation is, so the operation is not a probe over identifiers.

Answers 404 error.federation.not_configured when this deployment does not federate — FEDERATION_ENABLED is off, which is the default — before the credential is read or a store is touched. No capability is honoured while federation is off, so there is nothing a revoke would need to cut in the meantime.

Tags: federation.

Response 401: Unauthorized

Response 403: Forbidden

Response 400: Bad Request; Malformed handshake

Response 204: the request succeeded and there is no content to send

Response 404: Not found

Response 500: Internal server error

Response 425: Too early

Response 413: the request body exceeds the configured limit

Response 426: Protocol version unsupported

Source

pub async fn revoke_capability_request( &self, album_id: impl Into<AlbumIdF5595b0f>, jti: impl Into<Jti>, params: impl Into<RevokeCapabilityParams>, ) -> Result<Request<HttpBody>, Error<Infallible>>

The request revoke_capability sends, built exactly as it builds it — its URL, headers, credentials and body, the client’s RequestOptions headers and extensions, and its ops::Operation among the extensions — without sending it, for a caller that sends it itself (signing it, pacing it, or over another transport) and hands the response to its decoder. Nothing is replayed after a rejected refreshable credential: that is revoke_capability’s own send.

Source

pub async fn decode_revoke_capability( &self, response: Response<HttpBody>, ) -> Result<ResponseValue<()>, Error<RevokeCapabilityError>>

Decode a response to the request revoke_capability sends (ops::REVOKE_CAPABILITY), obtained however the caller sent it, exactly as revoke_capability decodes its own: the same status dispatch, typed error, and body limits from this client’s configuration. revoke_capability itself sends its request builder’s request through the client’s backend, replays it once where a refreshable credential was rejected, and decodes the response with this.

Source

pub fn revoke_capability_url( &self, album_id: impl Into<AlbumIdF5595b0f>, jti: impl Into<Jti>, ) -> Result<Url, Error<Infallible>>

The URL revoke_capability sends its request to, less any apiKey query credential, with the same path and query encoding, resolved against the client’s base URL or the operation’s server override. Nothing is sent and no credential is attached: this is for a URL handed to something that fetches it itself.

Source

pub async fn refresh_capability( &self, params: impl Into<RefreshCapabilityParams>, ) -> Result<ResponseValue<RefreshedCapabilityResponse>, Error<RefreshCapabilityError>>

Exchange a capability for its successor.

The credential is the capability being refreshed; a session token has nothing to refresh here and is refused.

Answers 404 error.federation.not_configured when this deployment does not federate — FEDERATION_ENABLED is off, which is the default — before the credential is verified, a budget is charged or a store is touched.

Tags: federation.

Response 401: Unauthorized

Response 403: Forbidden; Capability invalid; Capability revoked; Server blocked; Capability expired

Response 400: Bad Request; Malformed handshake

Response 200: OK

Response 409: Member not on roster

Response 429: Rate budget exceeded

Response 500: Internal server error

Response 404: Not found

Response 425: Too early

Response 413: the request body exceeds the configured limit

Response 426: Protocol version unsupported

Source

pub async fn refresh_capability_request( &self, params: impl Into<RefreshCapabilityParams>, ) -> Result<Request<HttpBody>, Error<Infallible>>

The request refresh_capability sends, built exactly as it builds it — its URL, headers, credentials and body, the client’s RequestOptions headers and extensions, and its ops::Operation among the extensions — without sending it, for a caller that sends it itself (signing it, pacing it, or over another transport) and hands the response to its decoder. Nothing is replayed after a rejected refreshable credential: that is refresh_capability’s own send.

Source

pub async fn decode_refresh_capability( &self, response: Response<HttpBody>, ) -> Result<ResponseValue<RefreshedCapabilityResponse>, Error<RefreshCapabilityError>>

Decode a response to the request refresh_capability sends (ops::REFRESH_CAPABILITY), obtained however the caller sent it, exactly as refresh_capability decodes its own: the same status dispatch, typed error, and body limits from this client’s configuration. refresh_capability itself sends its request builder’s request through the client’s backend, replays it once where a refreshable credential was rejected, and decodes the response with this.

Source

pub fn refresh_capability_url(&self) -> Result<Url, Error<Infallible>>

The URL refresh_capability sends its request to, less any apiKey query credential, with the same path and query encoding, resolved against the client’s base URL or the operation’s server override. Nothing is sent and no credential is attached: this is for a URL handed to something that fetches it itself.

Source

pub async fn submit_federated_report( &self, params: impl Into<SubmitFederatedReportParams>, body: impl Into<FederatedReportRequest>, ) -> Result<ResponseValue<FederatedReportResponse>, Error<SubmitFederatedReportError>>

File a signed moderation report from a peer server.

Answers 404 error.federation.not_configured when this deployment does not federate — FEDERATION_ENABLED is off, which is the default — before the body is read, a budget is charged or a store is touched.

§Only a pinned peer can file

A report is verified against the peer’s operator-pinned key, which an operator writes with capsule-server peer pin. A peer nobody pinned is answered 403 error.federation.peer_unknown, whatever it signed.

§No bearer, and why that is not “unauthenticated”

The reporting peer holds no capability here — it is reporting this server’s content, not pulling it — so there is nothing to present. What it does hold is a key an operator has pinned, and the report carries its own Ed25519 signature over the canonical CBOR of every other field. A report from a server nobody has pinned is 403: intake is not the moment a peer becomes trusted (design/federation.md’s TOFU is explicitly not done here).

§The order the checks run in

Bounds, then whether it is addressed here and signed just now, then who is speaking, then whether they are welcome, then whether they really said it, then whether they said it before, then how much they may ask for at all, then whose account it is, then whether they have said it too often.

Every field is length-capped first, and reporting_server must be a host name, before a store is read or a byte is keyed on. The recipient and the freshness window are pure checks on the body. No budget is charged before the signature verifies (design/moderation.md): a budget keyed on an origin a body merely claims is one a stranger spends in a real peer’s name. What an anonymous caller gets before that is one peer-store read and one Ed25519 verification — the work every bearer check costs on any authenticated route.

Once verified: the nonce is checked (a replay is refused before anything is charged to the peer), then CounterKey::FederatedIntake bounds the peer’s total intake, then the nonce is spent. Then the policy budgets: the contract’s per-(server, account) limit, and a per-peer ceiling that ignores the account, because reported_user is a string the peer chooses and a peer cycling accounts would otherwise mint itself a fresh allowance each time.

§A signed report is accepted once, here, now

The claim names its recipient and carries a nonce and the instant it was signed; a report addressed to another server, signed more than REPORT_FRESHNESS from this server’s clock, or carrying a nonce this peer already used is 401 error.moderation.report_unsigned. A peer that retries — after a 429, a timeout, a 500 — signs again with a fresh nonce.

Before any of that, the bytes parsed are bounded too: the federation group’s body cap, MAX_FEDERATION_BODY_BYTES, refuses a body past 16 KiB with 413 before it is read — far above any real report, far below the upload backstop every other group carries.

§What accepting one does

It writes a row an operator will read (ModerationStore::pending_reports) and nothing else. A peer’s report is an input to a decision, never a decision: no standing changes, no serving hold appears, and the reported account sees nothing — because nothing has been done to them.

§202 whether or not the account exists

A report naming an account this server does not host is accepted on the wire and dropped, with a warn for the operator. It is not filed: an unresolvable report is a permanent orphan row that nobody can act on, which is the reason the check exists at all.

The answer is deliberately the same one a filed report gets. An earlier version refused with a distinct coded 404, and that manufactured an account-enumeration oracle out of a check that did not need one: a pinned peer could walk identifiers and read existence off the status line. “Pinned” is not “trusted with enumeration” — a peer key can be compromised, and a peer can be adversarial toward its own users while remaining an operator’s legitimate partner — and this codebase treats exists-versus-does-not as a first-order defect nearly everywhere else (crate::routes::enroll‘s indistinguishable code refusal, the album ceremonies’ “not yours is not found”, crate::serve::authority’s 404/403 boundary).

Probing is not free even so: every budget above is charged before this point is reached, so a peer sweeping identifiers spends its allowance doing it and an operator sees the warn.

Tags: federation.

Response 400: Bad Request; Malformed report; Malformed handshake

Response 408: Request Timeout

Response 413: Payload Too Large; the request body exceeds the configured limit

Response 415: Unsupported Media Type

Response 422: Unprocessable Entity

Response 202: The report was accepted for review

Response 401: Report unsigned

Response 403: Peer unknown; Server blocked

Response 429: Report rate limited

Response 500: Internal server error

Response 404: Not found

Response 425: Too early

Response 426: Protocol version unsupported

Source

pub async fn submit_federated_report_request( &self, params: impl Into<SubmitFederatedReportParams>, body: impl Into<FederatedReportRequest>, ) -> Result<Request<HttpBody>, Error<Infallible>>

The request submit_federated_report sends, built exactly as it builds it — its URL, headers, credentials and body, the client’s RequestOptions headers and extensions, and its ops::Operation among the extensions — without sending it, for a caller that sends it itself (signing it, pacing it, or over another transport) and hands the response to its decoder. Nothing is replayed after a rejected refreshable credential: that is submit_federated_report’s own send.

Source

pub async fn decode_submit_federated_report( &self, response: Response<HttpBody>, ) -> Result<ResponseValue<FederatedReportResponse>, Error<SubmitFederatedReportError>>

Decode a response to the request submit_federated_report sends (ops::SUBMIT_FEDERATED_REPORT), obtained however the caller sent it, exactly as submit_federated_report decodes its own: the same status dispatch, typed error, and body limits from this client’s configuration. submit_federated_report itself sends its request builder’s request through the client’s backend, replays it once where a refreshable credential was rejected, and decodes the response with this.

Source

pub fn submit_federated_report_url(&self) -> Result<Url, Error<Infallible>>

The URL submit_federated_report sends its request to, less any apiKey query credential, with the same path and query encoding, resolved against the client’s base URL or the operation’s server override. Nothing is sent and no credential is attached: this is for a URL handed to something that fetches it itself.

Source

pub async fn submit_pull_hint( &self, params: impl Into<SubmitPullHintParams>, body: impl Into<PullHintRequest>, ) -> Result<ResponseValue<PullHintResponse>, Error<SubmitPullHintError>>

Receive a signed pull hint from an album’s home server.

Answers 404 error.federation.not_configured when this deployment does not federate — FEDERATION_ENABLED is off, which is the default — before the body is read, a budget is charged or a store is touched.

§A hint is advisory, and that is all it is

A verified hint brings the job pulling album_id from home_server forward: no sooner than one minute after that job’s last pull, never for a peer on probation, and never past the job’s back-off after a failed pull or the peer’s open circuit, which the pull worker applies to the job exactly as it would have. A hint adds no job, changes nothing about what is pulled or where from, and carries nothing that reaches validation. The album is pulled on its own interval whether or not a hint ever arrives, so a refused hint costs at most that interval.

§Only a pinned peer can hint, and only about its own albums

The hint carries its own Ed25519 signature, verified against the key an operator pinned for home_server with capsule-server peer pin; a peer nobody pinned is 403 error.federation.peer_unknown, whatever it signed. The job a hint touches is keyed on the signer, so a peer can only hint about albums this server pulls from that peer.

§The order the checks run in

The order report intake runs them in: bounds; whether it is addressed here and signed just now; who is speaking; whether they are welcome; whether they really said it; whether they said it before; how much they may ask for. No budget is charged before the signature verifies, so a stranger cannot spend a real peer’s hint budget by sending garbage under its name. A hint addressed to another server, signed more than five minutes from this server’s clock, or reusing a nonce this peer already used is 401 error.federation.hint_unsigned; a peer that retries signs again with a fresh nonce.

§202 whether or not this server pulls the album

A verified, admitted hint is answered 202 with the instant it was received, whatever became of it: it moved a job, the job was already due, this server pulls no such album, or the peer is on probation. Telling them apart would let a pinned peer walk album ids and read off which ones this server’s members subscribe to. A held job and one that is not cost the same work — one peer read and one schedule operation — so the answer’s timing does not tell them apart either; a peer on probation is answered after the peer read alone, which tells it only its own standing. Only a store that could not answer is different: 500 error.federation.unavailable, which says nothing about any album.

Tags: federation.

Response 400: Bad Request; Malformed hint; Malformed handshake

Response 408: Request Timeout

Response 413: Payload Too Large; the request body exceeds the configured limit

Response 415: Unsupported Media Type

Response 422: Unprocessable Entity

Response 202: The hint was received

Response 401: Hint unsigned

Response 403: Peer unknown; Server blocked

Response 429: Hint rate limited

Response 500: Internal server error

Response 404: Not found

Response 425: Too early

Response 426: Protocol version unsupported

Source

pub async fn submit_pull_hint_request( &self, params: impl Into<SubmitPullHintParams>, body: impl Into<PullHintRequest>, ) -> Result<Request<HttpBody>, Error<Infallible>>

The request submit_pull_hint sends, built exactly as it builds it — its URL, headers, credentials and body, the client’s RequestOptions headers and extensions, and its ops::Operation among the extensions — without sending it, for a caller that sends it itself (signing it, pacing it, or over another transport) and hands the response to its decoder. Nothing is replayed after a rejected refreshable credential: that is submit_pull_hint’s own send.

Source

pub async fn decode_submit_pull_hint( &self, response: Response<HttpBody>, ) -> Result<ResponseValue<PullHintResponse>, Error<SubmitPullHintError>>

Decode a response to the request submit_pull_hint sends (ops::SUBMIT_PULL_HINT), obtained however the caller sent it, exactly as submit_pull_hint decodes its own: the same status dispatch, typed error, and body limits from this client’s configuration. submit_pull_hint itself sends its request builder’s request through the client’s backend, replays it once where a refreshable credential was rejected, and decodes the response with this.

Source

pub fn submit_pull_hint_url(&self) -> Result<Url, Error<Infallible>>

The URL submit_pull_hint sends its request to, less any apiKey query credential, with the same path and query encoding, resolved against the client’s base URL or the operation’s server override. Nothing is sent and no credential is attached: this is for a URL handed to something that fetches it itself.

Source

pub async fn list_subscriptions( &self, params: impl Into<ListSubscriptionsParams>, ) -> Result<ResponseValue<SubscriptionsResponse>, Error<ListSubscriptionsError>>

List the caller’s subscriptions to federated albums, live or lapsed.

Answers 404 error.federation.not_configured when this deployment does not federate.

Tags: federation.

Response 401: Unauthorized

Response 403: Forbidden

Response 200: OK

Response 500: Internal server error

Response 404: Not found

Response 413: the request body exceeds the configured limit

Response 400: Bad Request; Malformed handshake

Source

pub async fn list_subscriptions_request( &self, params: impl Into<ListSubscriptionsParams>, ) -> Result<Request<HttpBody>, Error<Infallible>>

The request list_subscriptions sends, built exactly as it builds it — its URL, headers, credentials and body, the client’s RequestOptions headers and extensions, and its ops::Operation among the extensions — without sending it, for a caller that sends it itself (signing it, pacing it, or over another transport) and hands the response to its decoder. Nothing is replayed after a rejected refreshable credential: that is list_subscriptions’s own send.

Source

pub async fn decode_list_subscriptions( &self, response: Response<HttpBody>, ) -> Result<ResponseValue<SubscriptionsResponse>, Error<ListSubscriptionsError>>

Decode a response to the request list_subscriptions sends (ops::LIST_SUBSCRIPTIONS), obtained however the caller sent it, exactly as list_subscriptions decodes its own: the same status dispatch, typed error, and body limits from this client’s configuration. list_subscriptions itself sends its request builder’s request through the client’s backend, replays it once where a refreshable credential was rejected, and decodes the response with this.

Source

pub fn list_subscriptions_url(&self) -> Result<Url, Error<Infallible>>

The URL list_subscriptions sends its request to, less any apiKey query credential, with the same path and query encoding, resolved against the client’s base URL or the operation’s server override. Nothing is sent and no credential is attached: this is for a URL handed to something that fetches it itself.

Source

pub async fn subscribe_album( &self, params: impl Into<SubscribeAlbumParams>, body: impl Into<SubscribeRequest>, ) -> Result<ResponseValue<SubscribeAlbumResponse>, Error<SubscribeAlbumError>>

Subscribe to a federated album with the capability its home server minted for this server.

The capability is verified against the issuer’s pinned key before anything is recorded, and must name this server as its recipient. Posting one for an album already subscribed keeps whichever capability lives longer, so a replayed invite never undoes a renewal. An account holds at most 1,000 subscriptions; one more is refused 403 error.federation.subscription_limit until the caller unsubscribes from another.

Answers 404 error.federation.not_configured when this deployment does not federate — FEDERATION_ENABLED is off, which is the default — before the credential is read or a store is touched.

Tags: federation.

Response 401: Unauthorized

Response 403: Forbidden

Response 400: Bad Request; Malformed request; Malformed handshake

Response 408: Request Timeout

Response 413: Payload Too Large; the request body exceeds the configured limit

Response 415: Unsupported Media Type

Response 422: Unprocessable Entity

Response 201: The subscription was recorded

Response 200: The caller already held this subscription; here it is as it now stands

Response 500: Internal server error

Response 404: Not found

Response 425: Too early

Response 426: Protocol version unsupported

Source

pub async fn subscribe_album_request( &self, params: impl Into<SubscribeAlbumParams>, body: impl Into<SubscribeRequest>, ) -> Result<Request<HttpBody>, Error<Infallible>>

The request subscribe_album sends, built exactly as it builds it — its URL, headers, credentials and body, the client’s RequestOptions headers and extensions, and its ops::Operation among the extensions — without sending it, for a caller that sends it itself (signing it, pacing it, or over another transport) and hands the response to its decoder. Nothing is replayed after a rejected refreshable credential: that is subscribe_album’s own send.

Source

pub async fn decode_subscribe_album( &self, response: Response<HttpBody>, ) -> Result<ResponseValue<SubscribeAlbumResponse>, Error<SubscribeAlbumError>>

Decode a response to the request subscribe_album sends (ops::SUBSCRIBE_ALBUM), obtained however the caller sent it, exactly as subscribe_album decodes its own: the same status dispatch, typed error, and body limits from this client’s configuration. subscribe_album itself sends its request builder’s request through the client’s backend, replays it once where a refreshable credential was rejected, and decodes the response with this.

Source

pub fn subscribe_album_url(&self) -> Result<Url, Error<Infallible>>

The URL subscribe_album sends its request to, less any apiKey query credential, with the same path and query encoding, resolved against the client’s base URL or the operation’s server override. Nothing is sent and no credential is attached: this is for a URL handed to something that fetches it itself.

Source

pub async fn unsubscribe_album( &self, peer: impl Into<Peer>, album_id: impl Into<AlbumId8e11ae4e>, params: impl Into<UnsubscribeAlbumParams>, ) -> Result<ResponseValue<()>, Error<UnsubscribeAlbumError>>

Stop pulling one federated album for the caller.

Idempotent: a subscription the caller does not hold is the same 204. Another member’s subscription to the same album is untouched, and so is anything already pulled.

Answers 404 error.federation.not_configured when this deployment does not federate.

Tags: federation.

Response 401: Unauthorized

Response 403: Forbidden

Response 400: Bad Request; Malformed handshake

Response 204: the request succeeded and there is no content to send

Response 500: Internal server error

Response 404: Not found

Response 425: Too early

Response 413: the request body exceeds the configured limit

Response 426: Protocol version unsupported

Source

pub async fn unsubscribe_album_request( &self, peer: impl Into<Peer>, album_id: impl Into<AlbumId8e11ae4e>, params: impl Into<UnsubscribeAlbumParams>, ) -> Result<Request<HttpBody>, Error<Infallible>>

The request unsubscribe_album sends, built exactly as it builds it — its URL, headers, credentials and body, the client’s RequestOptions headers and extensions, and its ops::Operation among the extensions — without sending it, for a caller that sends it itself (signing it, pacing it, or over another transport) and hands the response to its decoder. Nothing is replayed after a rejected refreshable credential: that is unsubscribe_album’s own send.

Source

pub async fn decode_unsubscribe_album( &self, response: Response<HttpBody>, ) -> Result<ResponseValue<()>, Error<UnsubscribeAlbumError>>

Decode a response to the request unsubscribe_album sends (ops::UNSUBSCRIBE_ALBUM), obtained however the caller sent it, exactly as unsubscribe_album decodes its own: the same status dispatch, typed error, and body limits from this client’s configuration. unsubscribe_album itself sends its request builder’s request through the client’s backend, replays it once where a refreshable credential was rejected, and decodes the response with this.

Source

pub fn unsubscribe_album_url( &self, peer: impl Into<Peer>, album_id: impl Into<AlbumId8e11ae4e>, ) -> Result<Url, Error<Infallible>>

The URL unsubscribe_album sends its request to, less any apiKey query credential, with the same path and query encoding, resolved against the client’s base URL or the operation’s server override. Nothing is sent and no credential is attached: this is for a URL handed to something that fetches it itself.

Source

pub async fn list_pulled_assets( &self, peer: impl Into<PeerC7b07b28>, album_id: impl Into<AlbumId2aa807d9>, params: impl Into<ListPulledAssetsParams>, ) -> Result<ResponseValue<PulledAssetsResponse>, Error<ListPulledAssetsError>>

List the assets this server pulled for one of the caller’s subscriptions, a page at a time.

Each asset is its breadcrumb, read from the latest entry a pull accepted for it, so nothing listed is anything but what passed this server’s re-validation. Deleted and purged assets are not listed. A subscription nothing has been pulled for yet answers an empty page.

Answers 404 error.federation.album_not_found when the caller holds no live subscription to the album, whoever else does; and 404 error.federation.not_configured when this deployment does not federate.

Tags: federation.

Response 401: Unauthorized

Response 403: Forbidden

Response 400: Bad Request; Malformed handshake

Response 200: OK

Response 404: Not found

Response 500: Internal server error

Response 413: the request body exceeds the configured limit

Source

pub async fn list_pulled_assets_request( &self, peer: impl Into<PeerC7b07b28>, album_id: impl Into<AlbumId2aa807d9>, params: impl Into<ListPulledAssetsParams>, ) -> Result<Request<HttpBody>, Error<Infallible>>

The request list_pulled_assets sends, built exactly as it builds it — its URL, headers, credentials and body, the client’s RequestOptions headers and extensions, and its ops::Operation among the extensions — without sending it, for a caller that sends it itself (signing it, pacing it, or over another transport) and hands the response to its decoder. Nothing is replayed after a rejected refreshable credential: that is list_pulled_assets’s own send.

Source

pub async fn decode_list_pulled_assets( &self, response: Response<HttpBody>, ) -> Result<ResponseValue<PulledAssetsResponse>, Error<ListPulledAssetsError>>

Decode a response to the request list_pulled_assets sends (ops::LIST_PULLED_ASSETS), obtained however the caller sent it, exactly as list_pulled_assets decodes its own: the same status dispatch, typed error, and body limits from this client’s configuration. list_pulled_assets itself sends its request builder’s request through the client’s backend, replays it once where a refreshable credential was rejected, and decodes the response with this.

Source

pub fn list_pulled_assets_url( &self, peer: impl Into<PeerC7b07b28>, album_id: impl Into<AlbumId2aa807d9>, params: impl Into<ListPulledAssetsParams>, ) -> Result<Url, Error<Infallible>>

The URL list_pulled_assets sends its request to, less any apiKey query credential, with the same path and query encoding, resolved against the client’s base URL or the operation’s server override. Nothing is sent and no credential is attached: this is for a URL handed to something that fetches it itself.

Source

pub async fn get_pulled_asset_metadata( &self, peer: impl Into<PeerEa927915>, album_id: impl Into<AlbumId40e65e24>, asset_id: impl Into<AssetIdBfe71377>, params: impl Into<GetPulledAssetMetadataParams>, ) -> Result<ResponseValue<ResponseBody1d462c0f>, Error<GetPulledAssetMetadataError>>

Fetch the encrypted metadata blob one asset of a pulled album carries, as the pull stored it.

Opaque octets, byte for byte what the album’s home server served and this server verified against its address: this server holds no key to them. The blob is the one the asset’s latest accepted entry carries.

Answers 404 error.federation.album_not_found when the caller holds no live subscription to the album, or the album holds no live asset by that id with a metadata blob; and 404 error.federation.not_configured when this deployment does not federate.

Tags: federation.

Response 401: Unauthorized

Response 403: Forbidden

Response 400: Bad Request; Malformed handshake

Response 200: OK

Response 404: Not found

Response 500: Internal server error

Response 413: the request body exceeds the configured limit

Source

pub async fn get_pulled_asset_metadata_request( &self, peer: impl Into<PeerEa927915>, album_id: impl Into<AlbumId40e65e24>, asset_id: impl Into<AssetIdBfe71377>, params: impl Into<GetPulledAssetMetadataParams>, ) -> Result<Request<HttpBody>, Error<Infallible>>

The request get_pulled_asset_metadata sends, built exactly as it builds it — its URL, headers, credentials and body, the client’s RequestOptions headers and extensions, and its ops::Operation among the extensions — without sending it, for a caller that sends it itself (signing it, pacing it, or over another transport) and hands the response to its decoder. Nothing is replayed after a rejected refreshable credential: that is get_pulled_asset_metadata’s own send.

Source

pub async fn decode_get_pulled_asset_metadata( &self, response: Response<HttpBody>, ) -> Result<ResponseValue<ResponseBody1d462c0f>, Error<GetPulledAssetMetadataError>>

Decode a response to the request get_pulled_asset_metadata sends (ops::GET_PULLED_ASSET_METADATA), obtained however the caller sent it, exactly as get_pulled_asset_metadata decodes its own: the same status dispatch, typed error, and body limits from this client’s configuration. get_pulled_asset_metadata itself sends its request builder’s request through the client’s backend, replays it once where a refreshable credential was rejected, and decodes the response with this.

Source

pub fn get_pulled_asset_metadata_url( &self, peer: impl Into<PeerEa927915>, album_id: impl Into<AlbumId40e65e24>, asset_id: impl Into<AssetIdBfe71377>, ) -> Result<Url, Error<Infallible>>

The URL get_pulled_asset_metadata sends its request to, less any apiKey query credential, with the same path and query encoding, resolved against the client’s base URL or the operation’s server override. Nothing is sent and no credential is attached: this is for a URL handed to something that fetches it itself.

Source

pub async fn get_pulled_asset_metadata_stream( &self, peer: impl Into<PeerEa927915>, album_id: impl Into<AlbumId40e65e24>, asset_id: impl Into<AssetIdBfe71377>, params: impl Into<GetPulledAssetMetadataParams>, ) -> Result<ResponseValue<ByteStream>, Error<GetPulledAssetMetadataError>>

get_pulled_asset_metadata, with its success body handed over unread as a ByteStream, to read as it arrives, or whole with collect_bounded under a limit of the caller’s choosing. The request and the error branch are get_pulled_asset_metadata’s. Like an EventStream, the call is exempt from the client’s total timeout and its body limits; its connect and read timeouts still apply. It sends its request builder’s request through the client’s backend, replays it once where a refreshable credential was rejected, and decodes the response with its decoder.

Source

pub async fn get_pulled_asset_metadata_stream_request( &self, peer: impl Into<PeerEa927915>, album_id: impl Into<AlbumId40e65e24>, asset_id: impl Into<AssetIdBfe71377>, params: impl Into<GetPulledAssetMetadataParams>, ) -> Result<Request<HttpBody>, Error<Infallible>>

The request get_pulled_asset_metadata_stream sends, built without sending it: get_pulled_asset_metadata’s request, exempt from the client’s total timeout as get_pulled_asset_metadata_stream’s is, for a caller that sends it itself and hands the response to get_pulled_asset_metadata_stream’s decoder. Nothing is replayed after a rejected refreshable credential: that is get_pulled_asset_metadata_stream’s own send.

Source

pub async fn decode_get_pulled_asset_metadata_stream( &self, response: Response<HttpBody>, ) -> Result<ResponseValue<ByteStream>, Error<GetPulledAssetMetadataError>>

Decode a response to the request get_pulled_asset_metadata_stream sends (ops::GET_PULLED_ASSET_METADATA), obtained however the caller sent it, exactly as get_pulled_asset_metadata_stream decodes its own: a success body handed over unread as a ByteStream, exempt from the client’s body limits, and an error status dispatched into the operation’s typed error.

Source

pub async fn list_devices( &self, params: impl Into<ListDevicesParams>, ) -> Result<ResponseValue<DevicesResponse>, Error<ListDevicesError>>

List the caller’s live sessions and the cohorts they group under.

Scoped by credential with no path parameter, for the same reason the escrow is: the only account entitled to a session ledger is its own, and making that structural beats enforcing it.

Tags: devices.

Response 401: Unauthorized

Response 403: Forbidden

Response 200: OK

Response 500: Internal server error

Response 413: the request body exceeds the configured limit

Response 400: Bad Request; Malformed handshake

Source

pub async fn list_devices_request( &self, params: impl Into<ListDevicesParams>, ) -> Result<Request<HttpBody>, Error<Infallible>>

The request list_devices sends, built exactly as it builds it — its URL, headers, credentials and body, the client’s RequestOptions headers and extensions, and its ops::Operation among the extensions — without sending it, for a caller that sends it itself (signing it, pacing it, or over another transport) and hands the response to its decoder. Nothing is replayed after a rejected refreshable credential: that is list_devices’s own send.

Source

pub async fn decode_list_devices( &self, response: Response<HttpBody>, ) -> Result<ResponseValue<DevicesResponse>, Error<ListDevicesError>>

Decode a response to the request list_devices sends (ops::LIST_DEVICES), obtained however the caller sent it, exactly as list_devices decodes its own: the same status dispatch, typed error, and body limits from this client’s configuration. list_devices itself sends its request builder’s request through the client’s backend, replays it once where a refreshable credential was rejected, and decodes the response with this.

Source

pub fn list_devices_url(&self) -> Result<Url, Error<Infallible>>

The URL list_devices sends its request to, less any apiKey query credential, with the same path and query encoding, resolved against the client’s base URL or the operation’s server override. Nothing is sent and no credential is attached: this is for a URL handed to something that fetches it itself.

Source

pub async fn get_quota( &self, params: impl Into<GetQuotaParams>, ) -> Result<ResponseValue<QuotaResponse>, Error<GetQuotaError>>

Report the authenticated uploader’s storage-quota snapshot.

Scoped to the caller, and to nobody else: quota is accounted to the uploader, and one account’s storage use is not another’s business.

Tags: quota.

Response 401: Unauthorized

Response 403: Forbidden

Response 200: OK

Response 500: Internal server error

Response 413: the request body exceeds the configured limit

Response 400: Bad Request; Malformed handshake

Source

pub async fn get_quota_request( &self, params: impl Into<GetQuotaParams>, ) -> Result<Request<HttpBody>, Error<Infallible>>

The request get_quota sends, built exactly as it builds it — its URL, headers, credentials and body, the client’s RequestOptions headers and extensions, and its ops::Operation among the extensions — without sending it, for a caller that sends it itself (signing it, pacing it, or over another transport) and hands the response to its decoder. Nothing is replayed after a rejected refreshable credential: that is get_quota’s own send.

Source

pub async fn decode_get_quota( &self, response: Response<HttpBody>, ) -> Result<ResponseValue<QuotaResponse>, Error<GetQuotaError>>

Decode a response to the request get_quota sends (ops::GET_QUOTA), obtained however the caller sent it, exactly as get_quota decodes its own: the same status dispatch, typed error, and body limits from this client’s configuration. get_quota itself sends its request builder’s request through the client’s backend, replays it once where a refreshable credential was rejected, and decodes the response with this.

Source

pub fn get_quota_url(&self) -> Result<Url, Error<Infallible>>

The URL get_quota sends its request to, less any apiKey query credential, with the same path and query encoding, resolved against the client’s base URL or the operation’s server override. Nothing is sent and no credential is attached: this is for a URL handed to something that fetches it itself.

Source

pub async fn moderation_record( &self, params: impl Into<ModerationRecordParams>, ) -> Result<ResponseValue<ModerationRecordResponse>, Error<ModerationRecordError>>

Serve the caller’s own moderation record.

Tags: moderation.

Response 401: Unauthorized

Response 403: Forbidden

Response 200: OK

Response 500: Internal server error

Response 413: the request body exceeds the configured limit

Response 400: Bad Request; Malformed handshake

Source

pub async fn moderation_record_request( &self, params: impl Into<ModerationRecordParams>, ) -> Result<Request<HttpBody>, Error<Infallible>>

The request moderation_record sends, built exactly as it builds it — its URL, headers, credentials and body, the client’s RequestOptions headers and extensions, and its ops::Operation among the extensions — without sending it, for a caller that sends it itself (signing it, pacing it, or over another transport) and hands the response to its decoder. Nothing is replayed after a rejected refreshable credential: that is moderation_record’s own send.

Source

pub async fn decode_moderation_record( &self, response: Response<HttpBody>, ) -> Result<ResponseValue<ModerationRecordResponse>, Error<ModerationRecordError>>

Decode a response to the request moderation_record sends (ops::MODERATION_RECORD), obtained however the caller sent it, exactly as moderation_record decodes its own: the same status dispatch, typed error, and body limits from this client’s configuration. moderation_record itself sends its request builder’s request through the client’s backend, replays it once where a refreshable credential was rejected, and decodes the response with this.

Source

pub fn moderation_record_url(&self) -> Result<Url, Error<Infallible>>

The URL moderation_record sends its request to, less any apiKey query credential, with the same path and query encoding, resolved against the client’s base URL or the operation’s server override. Nothing is sent and no credential is attached: this is for a URL handed to something that fetches it itself.

Source

pub async fn list_upload_sessions( &self, params: impl Into<ListUploadSessionsParams>, ) -> Result<ResponseValue<SessionsResponse>, Error<ListUploadSessionsError>>

Every upload the caller can resume.

Oldest first, which is the order the store promises and the order a client wants: the oldest in-flight session is the one closest to eviction.

Tags: upload.

Response 401: Unauthorized

Response 403: Forbidden

Response 400: Bad Request; Invalid status filter; Malformed handshake

Response 200: OK

Response 500: Internal server error

Response 413: the request body exceeds the configured limit

Source

pub async fn list_upload_sessions_request( &self, params: impl Into<ListUploadSessionsParams>, ) -> Result<Request<HttpBody>, Error<Infallible>>

The request list_upload_sessions sends, built exactly as it builds it — its URL, headers, credentials and body, the client’s RequestOptions headers and extensions, and its ops::Operation among the extensions — without sending it, for a caller that sends it itself (signing it, pacing it, or over another transport) and hands the response to its decoder. Nothing is replayed after a rejected refreshable credential: that is list_upload_sessions’s own send.

Source

pub async fn decode_list_upload_sessions( &self, response: Response<HttpBody>, ) -> Result<ResponseValue<SessionsResponse>, Error<ListUploadSessionsError>>

Decode a response to the request list_upload_sessions sends (ops::LIST_UPLOAD_SESSIONS), obtained however the caller sent it, exactly as list_upload_sessions decodes its own: the same status dispatch, typed error, and body limits from this client’s configuration. list_upload_sessions itself sends its request builder’s request through the client’s backend, replays it once where a refreshable credential was rejected, and decodes the response with this.

Source

pub fn list_upload_sessions_url( &self, params: impl Into<ListUploadSessionsParams>, ) -> Result<Url, Error<Infallible>>

The URL list_upload_sessions sends its request to, less any apiKey query credential, with the same path and query encoding, resolved against the client’s base URL or the operation’s server override. Nothing is sent and no credential is attached: this is for a URL handed to something that fetches it itself.

Source

pub async fn sync_feed( &self, params: impl Into<SyncFeedParams>, ) -> Result<ResponseValue<SyncPageResponse>, Error<SyncFeedError>>

Returns the changes in the caller’s library after cursor.

Read-only and idempotent: two calls with the same cursor return the same page, because the cursor names a position rather than consuming one. That is what makes a lost response harmless and a retry free.

Tags: sync.

Response 401: Unauthorized

Response 403: Forbidden; Album access denied; Capability revoked; Audience mismatch; Server blocked

Response 400: Bad Request; Invalid sync cursor; Malformed handshake

Response 200: OK

Response 409: Stale sync cursor

Response 429: Rate budget exceeded

Response 500: Internal server error

Response 413: the request body exceeds the configured limit

Source

pub async fn sync_feed_request( &self, params: impl Into<SyncFeedParams>, ) -> Result<Request<HttpBody>, Error<Infallible>>

The request sync_feed sends, built exactly as it builds it — its URL, headers, credentials and body, the client’s RequestOptions headers and extensions, and its ops::Operation among the extensions — without sending it, for a caller that sends it itself (signing it, pacing it, or over another transport) and hands the response to its decoder. Nothing is replayed after a rejected refreshable credential: that is sync_feed’s own send.

Source

pub async fn decode_sync_feed( &self, response: Response<HttpBody>, ) -> Result<ResponseValue<SyncPageResponse>, Error<SyncFeedError>>

Decode a response to the request sync_feed sends (ops::SYNC_FEED), obtained however the caller sent it, exactly as sync_feed decodes its own: the same status dispatch, typed error, and body limits from this client’s configuration. sync_feed itself sends its request builder’s request through the client’s backend, replays it once where a refreshable credential was rejected, and decodes the response with this.

Source

pub fn sync_feed_url( &self, params: impl Into<SyncFeedParams>, ) -> Result<Url, Error<Infallible>>

The URL sync_feed sends its request to, less any apiKey query credential, with the same path and query encoding, resolved against the client’s base URL or the operation’s server override. Nothing is sent and no credential is attached: this is for a URL handed to something that fetches it itself.

Source

pub async fn get_blob( &self, hash: impl Into<Hash4f9afb63>, params: impl Into<GetBlobParams>, ) -> Result<ResponseValue<GetBlobResponse>, Error<GetBlobError>>

Fetch a ciphertext blob by its content address, ranged.

Opaque octets: the server holds no key and this route never learns what it is serving. An account fetches the blobs of its own assets and of the albums it is currently a member of; a former member is told 403, and everyone else is told what an unknown address is told — see crate::serve for the boundary and its reasons.

The one answer that is account-scoped is the transient 409: it reports the caller’s own in-flight upload and nobody else’s.

A federated peer fetches here with a capability instead of a session token, through the same resolution and the same authority.

Tags: media.

Response 401: Unauthorized

Response 403: Forbidden; Access revoked; Capability revoked; Server blocked; Scope insufficient

Response 400: Bad Request; Malformed handshake

Response 200: the whole representation

Response 206: the part the request asked for

Response 304: the client’s copy is current

Response 412: the representation is not the one the client’s copy came from

Response 416: Range Not Satisfiable

Response 404: Not found

Response 409: Upload in progress

Response 410: Gone

Response 429: Rate budget exceeded

Response 500: Internal server error

Response 413: the request body exceeds the configured limit

Source

pub async fn get_blob_request( &self, hash: impl Into<Hash4f9afb63>, params: impl Into<GetBlobParams>, ) -> Result<Request<HttpBody>, Error<Infallible>>

The request get_blob sends, built exactly as it builds it — its URL, headers, credentials and body, the client’s RequestOptions headers and extensions, and its ops::Operation among the extensions — without sending it, for a caller that sends it itself (signing it, pacing it, or over another transport) and hands the response to its decoder. Nothing is replayed after a rejected refreshable credential: that is get_blob’s own send.

Source

pub async fn decode_get_blob( &self, response: Response<HttpBody>, ) -> Result<ResponseValue<GetBlobResponse>, Error<GetBlobError>>

Decode a response to the request get_blob sends (ops::GET_BLOB), obtained however the caller sent it, exactly as get_blob decodes its own: the same status dispatch, typed error, and body limits from this client’s configuration. get_blob itself sends its request builder’s request through the client’s backend, replays it once where a refreshable credential was rejected, and decodes the response with this.

Source

pub fn get_blob_url( &self, hash: impl Into<Hash4f9afb63>, ) -> Result<Url, Error<Infallible>>

The URL get_blob sends its request to, less any apiKey query credential, with the same path and query encoding, resolved against the client’s base URL or the operation’s server override. Nothing is sent and no credential is attached: this is for a URL handed to something that fetches it itself.

Source

pub async fn get_blob_stream( &self, hash: impl Into<Hash4f9afb63>, params: impl Into<GetBlobParams>, ) -> Result<ResponseValue<GetBlobStreamResponse>, Error<GetBlobError>>

get_blob, with each raw binary success body handed over unread as a ByteStream in its status’s variant, to read as it arrives, or whole with collect_bounded under a limit of the caller’s choosing. The request and the error branch are get_blob’s. Like an EventStream, the call is exempt from the client’s total timeout and its body limits; its connect and read timeouts still apply. Every other success body is read whole under the client’s body limits, as get_blob reads it. It sends its request builder’s request through the client’s backend, replays it once where a refreshable credential was rejected, and decodes the response with its decoder.

Source

pub async fn get_blob_stream_request( &self, hash: impl Into<Hash4f9afb63>, params: impl Into<GetBlobParams>, ) -> Result<Request<HttpBody>, Error<Infallible>>

The request get_blob_stream sends, built without sending it: get_blob’s request, exempt from the client’s total timeout as get_blob_stream’s is, for a caller that sends it itself and hands the response to get_blob_stream’s decoder. Nothing is replayed after a rejected refreshable credential: that is get_blob_stream’s own send.

Source

pub async fn decode_get_blob_stream( &self, response: Response<HttpBody>, ) -> Result<ResponseValue<GetBlobStreamResponse>, Error<GetBlobError>>

Decode a response to the request get_blob_stream sends (ops::GET_BLOB), obtained however the caller sent it, exactly as get_blob_stream decodes its own: a raw binary success body handed over unread as a ByteStream, exempt from the client’s body limits, any other success body read whole within them, and an error status dispatched into the operation’s typed error.

Source

pub async fn get_asset_receipts( &self, asset_id: impl Into<AssetId>, params: impl Into<GetAssetReceiptsParams>, ) -> Result<ResponseValue<AssetReceiptsResponse>, Error<GetAssetReceiptsError>>

Fetch every custody receipt covering one asset.

Tags: storage.

Response 401: Unauthorized

Response 403: Forbidden

Response 400: Bad Request; Malformed handshake

Response 200: OK

Response 404: Not found

Response 500: Internal server error

Response 413: the request body exceeds the configured limit

Source

pub async fn get_asset_receipts_request( &self, asset_id: impl Into<AssetId>, params: impl Into<GetAssetReceiptsParams>, ) -> Result<Request<HttpBody>, Error<Infallible>>

The request get_asset_receipts sends, built exactly as it builds it — its URL, headers, credentials and body, the client’s RequestOptions headers and extensions, and its ops::Operation among the extensions — without sending it, for a caller that sends it itself (signing it, pacing it, or over another transport) and hands the response to its decoder. Nothing is replayed after a rejected refreshable credential: that is get_asset_receipts’s own send.

Source

pub async fn decode_get_asset_receipts( &self, response: Response<HttpBody>, ) -> Result<ResponseValue<AssetReceiptsResponse>, Error<GetAssetReceiptsError>>

Decode a response to the request get_asset_receipts sends (ops::GET_ASSET_RECEIPTS), obtained however the caller sent it, exactly as get_asset_receipts decodes its own: the same status dispatch, typed error, and body limits from this client’s configuration. get_asset_receipts itself sends its request builder’s request through the client’s backend, replays it once where a refreshable credential was rejected, and decodes the response with this.

Source

pub fn get_asset_receipts_url( &self, asset_id: impl Into<AssetId>, ) -> Result<Url, Error<Infallible>>

The URL get_asset_receipts sends its request to, less any apiKey query credential, with the same path and query encoding, resolved against the client’s base URL or the operation’s server override. Nothing is sent and no credential is attached: this is for a URL handed to something that fetches it itself.

Source

pub async fn list_inbox( &self, params: impl Into<ListInboxParams>, ) -> Result<ResponseValue<InboxResponse>, Error<ListInboxError>>

The caller’s pending drops.

Tags: drops.

Response 401: Unauthorized

Response 403: Forbidden

Response 200: OK

Response 500: Internal server error

Response 413: the request body exceeds the configured limit

Response 400: Bad Request; Malformed handshake

Source

pub async fn list_inbox_request( &self, params: impl Into<ListInboxParams>, ) -> Result<Request<HttpBody>, Error<Infallible>>

The request list_inbox sends, built exactly as it builds it — its URL, headers, credentials and body, the client’s RequestOptions headers and extensions, and its ops::Operation among the extensions — without sending it, for a caller that sends it itself (signing it, pacing it, or over another transport) and hands the response to its decoder. Nothing is replayed after a rejected refreshable credential: that is list_inbox’s own send.

Source

pub async fn decode_list_inbox( &self, response: Response<HttpBody>, ) -> Result<ResponseValue<InboxResponse>, Error<ListInboxError>>

Decode a response to the request list_inbox sends (ops::LIST_INBOX), obtained however the caller sent it, exactly as list_inbox decodes its own: the same status dispatch, typed error, and body limits from this client’s configuration. list_inbox itself sends its request builder’s request through the client’s backend, replays it once where a refreshable credential was rejected, and decodes the response with this.

Source

pub fn list_inbox_url(&self) -> Result<Url, Error<Infallible>>

The URL list_inbox sends its request to, less any apiKey query credential, with the same path and query encoding, resolved against the client’s base URL or the operation’s server override. Nothing is sent and no credential is attached: this is for a URL handed to something that fetches it itself.

Source

pub async fn list_album_keys( &self, params: impl Into<ListAlbumKeysParams>, ) -> Result<ResponseValue<AlbumKeysListing>, Error<ListAlbumKeysError>>

List every album key escrow the caller holds, each blob verbatim.

What capsule auth recover reads to give a library created from the master key the account’s albums before anything creates one, and what a push compares its albums against to re-escrow only the ones that changed. An account that has escrowed no album gets an empty list, never a 404.

Tags: escrow.

Response 401: Unauthorized

Response 403: Forbidden

Response 200: OK

Response 500: Internal server error

Response 413: the request body exceeds the configured limit

Response 400: Bad Request; Malformed handshake

Source

pub async fn list_album_keys_request( &self, params: impl Into<ListAlbumKeysParams>, ) -> Result<Request<HttpBody>, Error<Infallible>>

The request list_album_keys sends, built exactly as it builds it — its URL, headers, credentials and body, the client’s RequestOptions headers and extensions, and its ops::Operation among the extensions — without sending it, for a caller that sends it itself (signing it, pacing it, or over another transport) and hands the response to its decoder. Nothing is replayed after a rejected refreshable credential: that is list_album_keys’s own send.

Source

pub async fn decode_list_album_keys( &self, response: Response<HttpBody>, ) -> Result<ResponseValue<AlbumKeysListing>, Error<ListAlbumKeysError>>

Decode a response to the request list_album_keys sends (ops::LIST_ALBUM_KEYS), obtained however the caller sent it, exactly as list_album_keys decodes its own: the same status dispatch, typed error, and body limits from this client’s configuration. list_album_keys itself sends its request builder’s request through the client’s backend, replays it once where a refreshable credential was rejected, and decodes the response with this.

Source

pub fn list_album_keys_url(&self) -> Result<Url, Error<Infallible>>

The URL list_album_keys sends its request to, less any apiKey query credential, with the same path and query encoding, resolved against the client’s base URL or the operation’s server override. Nothing is sent and no credential is attached: this is for a URL handed to something that fetches it itself.

Source

pub async fn list_activity( &self, params: impl Into<ListActivityParams>, ) -> Result<ResponseValue<ActivityResponse>, Error<ListActivityError>>

Serve the caller’s own activity log, newest first.

Tags: devices.

Response 401: Unauthorized

Response 403: Forbidden

Response 400: Bad Request; Malformed handshake

Response 200: OK

Response 500: Internal server error

Response 413: the request body exceeds the configured limit

Source

pub async fn list_activity_request( &self, params: impl Into<ListActivityParams>, ) -> Result<Request<HttpBody>, Error<Infallible>>

The request list_activity sends, built exactly as it builds it — its URL, headers, credentials and body, the client’s RequestOptions headers and extensions, and its ops::Operation among the extensions — without sending it, for a caller that sends it itself (signing it, pacing it, or over another transport) and hands the response to its decoder. Nothing is replayed after a rejected refreshable credential: that is list_activity’s own send.

Source

pub async fn decode_list_activity( &self, response: Response<HttpBody>, ) -> Result<ResponseValue<ActivityResponse>, Error<ListActivityError>>

Decode a response to the request list_activity sends (ops::LIST_ACTIVITY), obtained however the caller sent it, exactly as list_activity decodes its own: the same status dispatch, typed error, and body limits from this client’s configuration. list_activity itself sends its request builder’s request through the client’s backend, replays it once where a refreshable credential was rejected, and decodes the response with this.

Source

pub fn list_activity_url( &self, params: impl Into<ListActivityParams>, ) -> Result<Url, Error<Infallible>>

The URL list_activity sends its request to, less any apiKey query credential, with the same path and query encoding, resolved against the client’s base URL or the operation’s server override. Nothing is sent and no credential is attached: this is for a URL handed to something that fetches it itself.

Source

pub async fn get_version( &self, ) -> Result<ResponseValue<VersionResponse>, Error<GetVersionError>>

Reports the server’s name and version.

Unauthenticated and side-effect free. Clients use it as a reachability probe before attempting a protocol handshake, so it must stay cheap and must never fail for a reason the caller could act on — there is no failure variant, and the return type says so.

Response 200: OK

Response 413: the request body exceeds the configured limit

Source

pub async fn get_version_request( &self, ) -> Result<Request<HttpBody>, Error<Infallible>>

The request get_version sends, built exactly as it builds it — its URL, headers, credentials and body, the client’s RequestOptions headers and extensions, and its ops::Operation among the extensions — without sending it, for a caller that sends it itself (signing it, pacing it, or over another transport) and hands the response to its decoder. Nothing is replayed after a rejected refreshable credential: that is get_version’s own send.

Source

pub async fn decode_get_version( &self, response: Response<HttpBody>, ) -> Result<ResponseValue<VersionResponse>, Error<GetVersionError>>

Decode a response to the request get_version sends (ops::GET_VERSION), obtained however the caller sent it, exactly as get_version decodes its own: the same status dispatch, typed error, and body limits from this client’s configuration. get_version itself sends its request builder’s request through the client’s backend, replays it once where a refreshable credential was rejected, and decodes the response with this.

Source

pub fn get_version_url(&self) -> Result<Url, Error<Infallible>>

The URL get_version sends its request to, less any apiKey query credential, with the same path and query encoding, resolved against the client’s base URL or the operation’s server override. Nothing is sent and no credential is attached: this is for a URL handed to something that fetches it itself.

Source

pub async fn attestation_keys( &self, ) -> Result<ResponseValue<AttestationKeysResponse>, Error<AttestationKeysError>>

Serve this server’s storage-attestation keys and their append-only history.

Cacheable and unauthenticated. It changes only when a key rotates, and a client that pinned a stale copy still resolves every receipt signed before it fetched — which is the property the append-only ordering buys.

Tags: well-known.

Response 200: OK

Response 413: the request body exceeds the configured limit

Source

pub async fn attestation_keys_request( &self, ) -> Result<Request<HttpBody>, Error<Infallible>>

The request attestation_keys sends, built exactly as it builds it — its URL, headers, credentials and body, the client’s RequestOptions headers and extensions, and its ops::Operation among the extensions — without sending it, for a caller that sends it itself (signing it, pacing it, or over another transport) and hands the response to its decoder. Nothing is replayed after a rejected refreshable credential: that is attestation_keys’s own send.

Source

pub async fn decode_attestation_keys( &self, response: Response<HttpBody>, ) -> Result<ResponseValue<AttestationKeysResponse>, Error<AttestationKeysError>>

Decode a response to the request attestation_keys sends (ops::ATTESTATION_KEYS), obtained however the caller sent it, exactly as attestation_keys decodes its own: the same status dispatch, typed error, and body limits from this client’s configuration. attestation_keys itself sends its request builder’s request through the client’s backend, replays it once where a refreshable credential was rejected, and decodes the response with this.

Source

pub fn attestation_keys_url(&self) -> Result<Url, Error<Infallible>>

The URL attestation_keys sends its request to, less any apiKey query credential, with the same path and query encoding, resolved against the client’s base URL or the operation’s server override. Nothing is sent and no credential is attached: this is for a URL handed to something that fetches it itself.

Source

pub async fn server_info( &self, ) -> Result<ResponseValue<ServerInfoResponse>, Error<ServerInfoError>>

Serve this server’s public, server-scoped facts.

Unauthenticated by contract: a client deciding whether it can talk to this server at all has no credential yet, and a peer resolving the key that verifies a capability token must not need one from the server whose claims it is checking.

Tags: well-known.

Response 200: OK

Response 413: the request body exceeds the configured limit

Source

pub async fn server_info_request( &self, ) -> Result<Request<HttpBody>, Error<Infallible>>

The request server_info sends, built exactly as it builds it — its URL, headers, credentials and body, the client’s RequestOptions headers and extensions, and its ops::Operation among the extensions — without sending it, for a caller that sends it itself (signing it, pacing it, or over another transport) and hands the response to its decoder. Nothing is replayed after a rejected refreshable credential: that is server_info’s own send.

Source

pub async fn decode_server_info( &self, response: Response<HttpBody>, ) -> Result<ResponseValue<ServerInfoResponse>, Error<ServerInfoError>>

Decode a response to the request server_info sends (ops::SERVER_INFO), obtained however the caller sent it, exactly as server_info decodes its own: the same status dispatch, typed error, and body limits from this client’s configuration. server_info itself sends its request builder’s request through the client’s backend, replays it once where a refreshable credential was rejected, and decodes the response with this.

Source

pub fn server_info_url(&self) -> Result<Url, Error<Infallible>>

The URL server_info sends its request to, less any apiKey query credential, with the same path and query encoding, resolved against the client’s base URL or the operation’s server override. Nothing is sent and no credential is attached: this is for a URL handed to something that fetches it itself.

Source

pub async fn deprecation_announcements( &self, ) -> Result<ResponseValue<DeprecationsResponse>, Error<DeprecationAnnouncementsError>>

Serve the announced deprecation cutoffs.

The same announcements server-info carries, at their own path because that is the URL the Warning: header on a below-cutoff response points a human at, and because a client polling for a cutoff should not have to refetch the whole discovery record to find one.

Tags: well-known.

Response 200: OK

Response 413: the request body exceeds the configured limit

Source

pub async fn deprecation_announcements_request( &self, ) -> Result<Request<HttpBody>, Error<Infallible>>

The request deprecation_announcements sends, built exactly as it builds it — its URL, headers, credentials and body, the client’s RequestOptions headers and extensions, and its ops::Operation among the extensions — without sending it, for a caller that sends it itself (signing it, pacing it, or over another transport) and hands the response to its decoder. Nothing is replayed after a rejected refreshable credential: that is deprecation_announcements’s own send.

Source

pub async fn decode_deprecation_announcements( &self, response: Response<HttpBody>, ) -> Result<ResponseValue<DeprecationsResponse>, Error<DeprecationAnnouncementsError>>

Decode a response to the request deprecation_announcements sends (ops::DEPRECATION_ANNOUNCEMENTS), obtained however the caller sent it, exactly as deprecation_announcements decodes its own: the same status dispatch, typed error, and body limits from this client’s configuration. deprecation_announcements itself sends its request builder’s request through the client’s backend, replays it once where a refreshable credential was rejected, and decodes the response with this.

Source

pub fn deprecation_announcements_url(&self) -> Result<Url, Error<Infallible>>

The URL deprecation_announcements sends its request to, less any apiKey query credential, with the same path and query encoding, resolved against the client’s base URL or the operation’s server override. Nothing is sent and no credential is attached: this is for a URL handed to something that fetches it itself.

Source

pub async fn revoked_jti( &self, ) -> Result<ResponseValue<RevokedJtiResponse>, Error<RevokedJtiError>>

Serve the federation capability revocation list.

Bounded by at most 24 hours of revocations, because an entry past the token’s own exp is pruned and a capability token cannot be minted to live longer than that. Public: a peer checking whether a token it holds is still good is, by construction, not yet authenticated here, and the record names no user — only opaque jtis.

§Errors

Returns 503 if the revocation list cannot be read. Deliberately not an empty list: an empty list is the strongest possible claim this endpoint can make — nothing is revoked — and serving it on a storage failure would turn an outage into a silent un-revocation of every token, which is exactly what the peer-side fail-closed rule exists to prevent.

Tags: well-known.

Response 200: OK

Response 503: Revocation list unavailable

Response 413: the request body exceeds the configured limit

Source

pub async fn revoked_jti_request( &self, ) -> Result<Request<HttpBody>, Error<Infallible>>

The request revoked_jti sends, built exactly as it builds it — its URL, headers, credentials and body, the client’s RequestOptions headers and extensions, and its ops::Operation among the extensions — without sending it, for a caller that sends it itself (signing it, pacing it, or over another transport) and hands the response to its decoder. Nothing is replayed after a rejected refreshable credential: that is revoked_jti’s own send.

Source

pub async fn decode_revoked_jti( &self, response: Response<HttpBody>, ) -> Result<ResponseValue<RevokedJtiResponse>, Error<RevokedJtiError>>

Decode a response to the request revoked_jti sends (ops::REVOKED_JTI), obtained however the caller sent it, exactly as revoked_jti decodes its own: the same status dispatch, typed error, and body limits from this client’s configuration. revoked_jti itself sends its request builder’s request through the client’s backend, replays it once where a refreshable credential was rejected, and decodes the response with this.

Source

pub fn revoked_jti_url(&self) -> Result<Url, Error<Infallible>>

The URL revoked_jti sends its request to, less any apiKey query credential, with the same path and query encoding, resolved against the client’s base URL or the operation’s server override. Nothing is sent and no credential is attached: this is for a URL handed to something that fetches it itself.

Source

pub async fn share_metadata( &self, opaque_id: impl Into<OpaqueId803d8a4c>, ) -> Result<ResponseValue<SharedMetadataResponse>, Error<ShareMetadataError>>

What a viewer needs to begin, for a live link.

Tags: shares.

Response 400: Bad Request

Response 200: OK

Response 404: Not found

Response 429: Too many requests

Response 500: Internal server error

Response 413: the request body exceeds the configured limit

Source

pub async fn share_metadata_request( &self, opaque_id: impl Into<OpaqueId803d8a4c>, ) -> Result<Request<HttpBody>, Error<Infallible>>

The request share_metadata sends, built exactly as it builds it — its URL, headers, credentials and body, the client’s RequestOptions headers and extensions, and its ops::Operation among the extensions — without sending it, for a caller that sends it itself (signing it, pacing it, or over another transport) and hands the response to its decoder. Nothing is replayed after a rejected refreshable credential: that is share_metadata’s own send.

Source

pub async fn decode_share_metadata( &self, response: Response<HttpBody>, ) -> Result<ResponseValue<SharedMetadataResponse>, Error<ShareMetadataError>>

Decode a response to the request share_metadata sends (ops::SHARE_METADATA), obtained however the caller sent it, exactly as share_metadata decodes its own: the same status dispatch, typed error, and body limits from this client’s configuration. share_metadata itself sends its request builder’s request through the client’s backend, replays it once where a refreshable credential was rejected, and decodes the response with this.

Source

pub fn share_metadata_url( &self, opaque_id: impl Into<OpaqueId803d8a4c>, ) -> Result<Url, Error<Infallible>>

The URL share_metadata sends its request to, less any apiKey query credential, with the same path and query encoding, resolved against the client’s base URL or the operation’s server override. Nothing is sent and no credential is attached: this is for a URL handed to something that fetches it itself.

Source

pub async fn share_wrapped_secret( &self, opaque_id: impl Into<OpaqueId8d83cbb1>, ) -> Result<ResponseValue<ResponseBodyDd711e0b>, Error<ShareWrappedSecretError>>

The passphrase-wrapped scope material, when there is one.

The octets the issuer registered as wrapped_secret, byte for byte. A viewer fetches this only for a passphrase-protected link; a link with no passphrase carries its scope in the sealed metadata blob instead.

A link with no passphrase answers 404 rather than 204 or an empty body: whether a link is passphrase-protected is already disclosed by the metadata record, and a second way to ask the same question with a different shape is a second thing to keep consistent.

Tags: shares.

Response 400: Bad Request

Response 200: OK

Response 404: Not found

Response 429: Too many requests

Response 500: Internal server error

Response 413: the request body exceeds the configured limit

Source

pub async fn share_wrapped_secret_request( &self, opaque_id: impl Into<OpaqueId8d83cbb1>, ) -> Result<Request<HttpBody>, Error<Infallible>>

The request share_wrapped_secret sends, built exactly as it builds it — its URL, headers, credentials and body, the client’s RequestOptions headers and extensions, and its ops::Operation among the extensions — without sending it, for a caller that sends it itself (signing it, pacing it, or over another transport) and hands the response to its decoder. Nothing is replayed after a rejected refreshable credential: that is share_wrapped_secret’s own send.

Source

pub async fn decode_share_wrapped_secret( &self, response: Response<HttpBody>, ) -> Result<ResponseValue<ResponseBodyDd711e0b>, Error<ShareWrappedSecretError>>

Decode a response to the request share_wrapped_secret sends (ops::SHARE_WRAPPED_SECRET), obtained however the caller sent it, exactly as share_wrapped_secret decodes its own: the same status dispatch, typed error, and body limits from this client’s configuration. share_wrapped_secret itself sends its request builder’s request through the client’s backend, replays it once where a refreshable credential was rejected, and decodes the response with this.

Source

pub fn share_wrapped_secret_url( &self, opaque_id: impl Into<OpaqueId8d83cbb1>, ) -> Result<Url, Error<Infallible>>

The URL share_wrapped_secret sends its request to, less any apiKey query credential, with the same path and query encoding, resolved against the client’s base URL or the operation’s server override. Nothing is sent and no credential is attached: this is for a URL handed to something that fetches it itself.

Source

pub async fn share_wrapped_secret_stream( &self, opaque_id: impl Into<OpaqueId8d83cbb1>, ) -> Result<ResponseValue<ByteStream>, Error<ShareWrappedSecretError>>

share_wrapped_secret, with its success body handed over unread as a ByteStream, to read as it arrives, or whole with collect_bounded under a limit of the caller’s choosing. The request and the error branch are share_wrapped_secret’s. Like an EventStream, the call is exempt from the client’s total timeout and its body limits; its connect and read timeouts still apply. It sends its request builder’s request through the client’s backend, replays it once where a refreshable credential was rejected, and decodes the response with its decoder.

Source

pub async fn share_wrapped_secret_stream_request( &self, opaque_id: impl Into<OpaqueId8d83cbb1>, ) -> Result<Request<HttpBody>, Error<Infallible>>

The request share_wrapped_secret_stream sends, built without sending it: share_wrapped_secret’s request, exempt from the client’s total timeout as share_wrapped_secret_stream’s is, for a caller that sends it itself and hands the response to share_wrapped_secret_stream’s decoder. Nothing is replayed after a rejected refreshable credential: that is share_wrapped_secret_stream’s own send.

Source

pub async fn decode_share_wrapped_secret_stream( &self, response: Response<HttpBody>, ) -> Result<ResponseValue<ByteStream>, Error<ShareWrappedSecretError>>

Decode a response to the request share_wrapped_secret_stream sends (ops::SHARE_WRAPPED_SECRET), obtained however the caller sent it, exactly as share_wrapped_secret_stream decodes its own: a success body handed over unread as a ByteStream, exempt from the client’s body limits, and an error status dispatched into the operation’s typed error.

Source

pub async fn share_blob( &self, opaque_id: impl Into<OpaqueId854f8393>, hash: impl Into<Hash>, params: impl Into<Option<ShareBlobParams>>, ) -> Result<ResponseValue<ShareBlobResponse>, Error<ShareBlobError>>

Ciphertext for one of the link’s blobs, ranged.

The membership check is the security property: a link serves the addresses its record enumerates and nothing else, so it cannot be walked sideways into the album’s unstripped metadata. A blob the link does not name is the same 404 as a link that does not exist.

A delivery that carries bytes is recorded in the owner’s activity log, aggregated: one share_link.served per link per window, naming the link and never the blob, and written off the response path so it neither slows nor refuses the serve.

Tags: shares.

Response 400: Bad Request

Response 200: the whole representation

Response 206: the part the request asked for

Response 304: the client’s copy is current

Response 412: the representation is not the one the client’s copy came from

Response 416: Range Not Satisfiable

Response 404: Not found

Response 429: Too many requests

Response 500: Internal server error

Response 413: the request body exceeds the configured limit

Source

pub async fn share_blob_request( &self, opaque_id: impl Into<OpaqueId854f8393>, hash: impl Into<Hash>, params: impl Into<Option<ShareBlobParams>>, ) -> Result<Request<HttpBody>, Error<Infallible>>

The request share_blob sends, built exactly as it builds it — its URL, headers, credentials and body, the client’s RequestOptions headers and extensions, and its ops::Operation among the extensions — without sending it, for a caller that sends it itself (signing it, pacing it, or over another transport) and hands the response to its decoder. Nothing is replayed after a rejected refreshable credential: that is share_blob’s own send.

Source

pub async fn decode_share_blob( &self, response: Response<HttpBody>, ) -> Result<ResponseValue<ShareBlobResponse>, Error<ShareBlobError>>

Decode a response to the request share_blob sends (ops::SHARE_BLOB), obtained however the caller sent it, exactly as share_blob decodes its own: the same status dispatch, typed error, and body limits from this client’s configuration. share_blob itself sends its request builder’s request through the client’s backend, replays it once where a refreshable credential was rejected, and decodes the response with this.

Source

pub fn share_blob_url( &self, opaque_id: impl Into<OpaqueId854f8393>, hash: impl Into<Hash>, ) -> Result<Url, Error<Infallible>>

The URL share_blob sends its request to, less any apiKey query credential, with the same path and query encoding, resolved against the client’s base URL or the operation’s server override. Nothing is sent and no credential is attached: this is for a URL handed to something that fetches it itself.

Source

pub async fn share_blob_stream( &self, opaque_id: impl Into<OpaqueId854f8393>, hash: impl Into<Hash>, params: impl Into<Option<ShareBlobParams>>, ) -> Result<ResponseValue<ShareBlobStreamResponse>, Error<ShareBlobError>>

share_blob, with each raw binary success body handed over unread as a ByteStream in its status’s variant, to read as it arrives, or whole with collect_bounded under a limit of the caller’s choosing. The request and the error branch are share_blob’s. Like an EventStream, the call is exempt from the client’s total timeout and its body limits; its connect and read timeouts still apply. Every other success body is read whole under the client’s body limits, as share_blob reads it. It sends its request builder’s request through the client’s backend, replays it once where a refreshable credential was rejected, and decodes the response with its decoder.

Source

pub async fn share_blob_stream_request( &self, opaque_id: impl Into<OpaqueId854f8393>, hash: impl Into<Hash>, params: impl Into<Option<ShareBlobParams>>, ) -> Result<Request<HttpBody>, Error<Infallible>>

The request share_blob_stream sends, built without sending it: share_blob’s request, exempt from the client’s total timeout as share_blob_stream’s is, for a caller that sends it itself and hands the response to share_blob_stream’s decoder. Nothing is replayed after a rejected refreshable credential: that is share_blob_stream’s own send.

Source

pub async fn decode_share_blob_stream( &self, response: Response<HttpBody>, ) -> Result<ResponseValue<ShareBlobStreamResponse>, Error<ShareBlobError>>

Decode a response to the request share_blob_stream sends (ops::SHARE_BLOB), obtained however the caller sent it, exactly as share_blob_stream decodes its own: a raw binary success body handed over unread as a ByteStream, exempt from the client’s body limits, any other success body read whole within them, and an error status dispatched into the operation’s typed error.

Source

pub async fn drop_status( &self, opaque_id: impl Into<OpaqueId6d5b52c7>, upload_id: impl Into<UploadId>, ) -> Result<ResponseValue<DropStatusResponse>, Error<DropStatusError>>

Report a drop session’s state, and its deposit’s outcome once it has one.

The completing chunk is answered waiting_for_processing before the deposit’s re-hash runs, so this is where a guest learns whether the drop was filed or refused: completed, or failed_processing with the deposit’s error.* code. A guest polls it with backoff.

Authorized exactly as a chunk is: the link’s opaque id, live for chunks, plus a session that is a drop under that link’s owner. Read-only — it starts nothing, so polling it cannot change what it reports — and it charges no limiter: it reveals nothing the holder of the two ids does not already own, and a poll spending the per-source budget would refuse the guest’s next drop.

Tags: drops.

Response 400: Bad Request

Response 200: The drop session’s state

Response 404: Not found

Response 500: Internal server error

Response 413: the request body exceeds the configured limit

Source

pub async fn drop_status_request( &self, opaque_id: impl Into<OpaqueId6d5b52c7>, upload_id: impl Into<UploadId>, ) -> Result<Request<HttpBody>, Error<Infallible>>

The request drop_status sends, built exactly as it builds it — its URL, headers, credentials and body, the client’s RequestOptions headers and extensions, and its ops::Operation among the extensions — without sending it, for a caller that sends it itself (signing it, pacing it, or over another transport) and hands the response to its decoder. Nothing is replayed after a rejected refreshable credential: that is drop_status’s own send.

Source

pub async fn decode_drop_status( &self, response: Response<HttpBody>, ) -> Result<ResponseValue<DropStatusResponse>, Error<DropStatusError>>

Decode a response to the request drop_status sends (ops::DROP_STATUS), obtained however the caller sent it, exactly as drop_status decodes its own: the same status dispatch, typed error, and body limits from this client’s configuration. drop_status itself sends its request builder’s request through the client’s backend, replays it once where a refreshable credential was rejected, and decodes the response with this.

Source

pub fn drop_status_url( &self, opaque_id: impl Into<OpaqueId6d5b52c7>, upload_id: impl Into<UploadId>, ) -> Result<Url, Error<Infallible>>

The URL drop_status sends its request to, less any apiKey query credential, with the same path and query encoding, resolved against the client’s base URL or the operation’s server override. Nothing is sent and no credential is attached: this is for a URL handed to something that fetches it itself.

Source

pub async fn append_drop_chunk( &self, opaque_id: impl Into<OpaqueId179cf7b9>, upload_id: impl Into<UploadIdA66ba408>, params: impl Into<Option<AppendDropChunkParams>>, body: impl Into<HttpBody>, ) -> Result<ResponseValue<()>, Error<AppendDropChunkError>>

Append one chunk to a drop session.

The link is the credential: possession of the opaque id, plus a session that belongs to it. Everything after that is crate::upload::chunk::write_range — the album path’s own function.

Tags: drops.

Response 400: Bad Request; Malformed request; Malformed chunk

Response 415: Unsupported media type

Response 408: Request timeout

Response 204: the request succeeded and there is no content to send

Response 404: Not found

Response 409: Chunk refused

Response 500: Internal server error

Response 507: Insufficient storage

Response 503: Service unavailable

Response 425: Too early

Response 413: the request body exceeds the configured limit The request body is a types::AppendDropChunkBody (bytes::Bytes) or a Vec<u8>, moved in without a copy, or an HttpBody::wrap stream, sent as it is read and never replayed.

Source

pub async fn append_drop_chunk_request( &self, opaque_id: impl Into<OpaqueId179cf7b9>, upload_id: impl Into<UploadIdA66ba408>, params: impl Into<Option<AppendDropChunkParams>>, body: impl Into<HttpBody>, ) -> Result<Request<HttpBody>, Error<Infallible>>

The request append_drop_chunk sends, built exactly as it builds it — its URL, headers, credentials and body, the client’s RequestOptions headers and extensions, and its ops::Operation among the extensions — without sending it, for a caller that sends it itself (signing it, pacing it, or over another transport) and hands the response to its decoder. Nothing is replayed after a rejected refreshable credential: that is append_drop_chunk’s own send.

Source

pub async fn decode_append_drop_chunk( &self, response: Response<HttpBody>, ) -> Result<ResponseValue<()>, Error<AppendDropChunkError>>

Decode a response to the request append_drop_chunk sends (ops::APPEND_DROP_CHUNK), obtained however the caller sent it, exactly as append_drop_chunk decodes its own: the same status dispatch, typed error, and body limits from this client’s configuration. append_drop_chunk itself sends its request builder’s request through the client’s backend, replays it once where a refreshable credential was rejected, and decodes the response with this.

Source

pub fn append_drop_chunk_url( &self, opaque_id: impl Into<OpaqueId179cf7b9>, upload_id: impl Into<UploadIdA66ba408>, ) -> Result<Url, Error<Infallible>>

The URL append_drop_chunk sends its request to, less any apiKey query credential, with the same path and query encoding, resolved against the client’s base URL or the operation’s server override. Nothing is sent and no credential is attached: this is for a URL handed to something that fetches it itself.

Source

pub async fn refresh_token( &self, body: impl Into<RefreshRequest>, ) -> Result<ResponseValue<TokenResponse>, Error<RefreshTokenError>>

Exchange a refresh token for a new pair, rotating the session.

The presented session is closed and a new one opened in its place, so a refresh token is good exactly once. The session’s advisory provenance — its cohort hash and device id — is carried across the rotation, or the devices listing would lose track of a device every time its tokens turned over.

Tags: auth.

Response 400: Bad Request

Response 408: Request Timeout

Response 413: Payload Too Large; the request body exceeds the configured limit

Response 415: Unsupported Media Type

Response 422: Unprocessable Entity

Response 200: OK

Response 401: Session expired

Response 500: Internal server error

Response 425: Too early

Source

pub async fn refresh_token_request( &self, body: impl Into<RefreshRequest>, ) -> Result<Request<HttpBody>, Error<Infallible>>

The request refresh_token sends, built exactly as it builds it — its URL, headers, credentials and body, the client’s RequestOptions headers and extensions, and its ops::Operation among the extensions — without sending it, for a caller that sends it itself (signing it, pacing it, or over another transport) and hands the response to its decoder. Nothing is replayed after a rejected refreshable credential: that is refresh_token’s own send.

Source

pub async fn decode_refresh_token( &self, response: Response<HttpBody>, ) -> Result<ResponseValue<TokenResponse>, Error<RefreshTokenError>>

Decode a response to the request refresh_token sends (ops::REFRESH_TOKEN), obtained however the caller sent it, exactly as refresh_token decodes its own: the same status dispatch, typed error, and body limits from this client’s configuration. refresh_token itself sends its request builder’s request through the client’s backend, replays it once where a refreshable credential was rejected, and decodes the response with this.

Source

pub fn refresh_token_url(&self) -> Result<Url, Error<Infallible>>

The URL refresh_token sends its request to, less any apiKey query credential, with the same path and query encoding, resolved against the client’s base URL or the operation’s server override. Nothing is sent and no credential is attached: this is for a URL handed to something that fetches it itself.

Source

pub async fn logout(&self) -> Result<ResponseValue<()>, Error<LogoutError>>

End the session the presented access token was issued against.

Idempotent: a session that is already closed, expired, or was never opened produces the same answer, because “there is no longer a session” is what the caller asked for.

Tags: auth.

Response 401: Unauthorized

Response 403: Forbidden

Response 204: the request succeeded and there is no content to send

Response 500: Internal server error

Response 425: Too early

Response 413: the request body exceeds the configured limit

Source

pub async fn logout_request( &self, ) -> Result<Request<HttpBody>, Error<Infallible>>

The request logout sends, built exactly as it builds it — its URL, headers, credentials and body, the client’s RequestOptions headers and extensions, and its ops::Operation among the extensions — without sending it, for a caller that sends it itself (signing it, pacing it, or over another transport) and hands the response to its decoder. Nothing is replayed after a rejected refreshable credential: that is logout’s own send.

Source

pub async fn decode_logout( &self, response: Response<HttpBody>, ) -> Result<ResponseValue<()>, Error<LogoutError>>

Decode a response to the request logout sends (ops::LOGOUT), obtained however the caller sent it, exactly as logout decodes its own: the same status dispatch, typed error, and body limits from this client’s configuration. logout itself sends its request builder’s request through the client’s backend, replays it once where a refreshable credential was rejected, and decodes the response with this.

Source

pub fn logout_url(&self) -> Result<Url, Error<Infallible>>

The URL logout sends its request to, less any apiKey query credential, with the same path and query encoding, resolved against the client’s base URL or the operation’s server override. Nothing is sent and no credential is attached: this is for a URL handed to something that fetches it itself.

Source

pub async fn create_drop( &self, opaque_id: impl Into<OpaqueId>, body: impl Into<CreateDropRequest>, ) -> Result<ResponseValue<CreateDropResponse>, Error<CreateDropError>>

Open a drop session through a link.

Invariants 26–30 in order: the link admits the file and reserves its caps in one store operation, then the owner’s quota is charged, then the declaration is checked. A drop the owner’s quota will not admit is 403 error.quota.exceeded, or 403 error.quota.suspended while the operator has suspended the owner’s quota.

Tags: drops.

Response 400: Bad Request; Malformed drop

Response 408: Request Timeout

Response 413: Payload Too Large; File too large; the request body exceeds the configured limit

Response 415: Unsupported Media Type

Response 422: Unprocessable Entity

Response 201: A drop session is open and accepting chunks

Response 404: Not found

Response 403: Passphrase required; Quota exceeded; Quota suspended

Response 409: Link capacity exhausted

Response 429: Too many requests

Response 500: Internal server error

Response 425: Too early

Source

pub async fn create_drop_request( &self, opaque_id: impl Into<OpaqueId>, body: impl Into<CreateDropRequest>, ) -> Result<Request<HttpBody>, Error<Infallible>>

The request create_drop sends, built exactly as it builds it — its URL, headers, credentials and body, the client’s RequestOptions headers and extensions, and its ops::Operation among the extensions — without sending it, for a caller that sends it itself (signing it, pacing it, or over another transport) and hands the response to its decoder. Nothing is replayed after a rejected refreshable credential: that is create_drop’s own send.

Source

pub async fn decode_create_drop( &self, response: Response<HttpBody>, ) -> Result<ResponseValue<CreateDropResponse>, Error<CreateDropError>>

Decode a response to the request create_drop sends (ops::CREATE_DROP), obtained however the caller sent it, exactly as create_drop decodes its own: the same status dispatch, typed error, and body limits from this client’s configuration. create_drop itself sends its request builder’s request through the client’s backend, replays it once where a refreshable credential was rejected, and decodes the response with this.

Source

pub fn create_drop_url( &self, opaque_id: impl Into<OpaqueId>, ) -> Result<Url, Error<Infallible>>

The URL create_drop sends its request to, less any apiKey query credential, with the same path and query encoding, resolved against the client’s base URL or the operation’s server override. Nothing is sent and no credential is attached: this is for a URL handed to something that fetches it itself.

Trait Implementations§

Source§

impl Clone for Client

Source§

fn clone(&self) -> Client

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Client

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
§

impl<T> CompatExt for T

§

fn compat(self) -> Compat<T>
where T: Sized,

Applies the [Compat] adapter by value. Read more
§

fn compat_ref(&self) -> Compat<&T>

Applies the [Compat] adapter by shared reference. Read more
§

fn compat_mut(&mut self) -> Compat<&mut T>

Applies the [Compat] adapter by mutable reference. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T, UT> HandleAlloc<UT> for T
where T: Send + Sync,

§

fn new_handle(value: Arc<T>) -> Handle

Create a new handle for an Arc value Read more
§

unsafe fn clone_handle(handle: Handle) -> Handle

Clone a handle Read more
§

unsafe fn consume_handle(handle: Handle) -> Arc<T> ⓘ

Consume a handle, getting back the initial Arc<> Read more
§

unsafe fn get_arc(handle: Handle) -> Arc<Self> ⓘ

Get a clone of the Arc<> using a “borrowed” handle. Read more
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> MaybeSend for T
where T: Send + ?Sized,

Source§

impl<T> MaybeSync for T
where T: Sync + ?Sized,

§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

impl<T> PolicyExt for T
where T: ?Sized,

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns Action::Follow. Read more
§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more