Skip to main content

Crate marque_utils

Crate marque_utils 

Source
Expand description

Shared infrastructure for the marque workspace, ported from recoco-utils.

The crate collects small, dependency-light building blocks that several marque crates reuse. Every module past error and prelude sits behind its own Cargo feature, so a consumer pulls in only what it needs and nothing drags in the others:

  • error — the workspace error type, context combinators, and the client_* / internal_* / api_* bail macros. Always compiled.
  • prelude — the handful of names most call sites want in scope.
  • concur_control (feature concur_control) — semaphore-based backpressure on in-flight rows and bytes.
  • batching (feature batching) — coalesces concurrent single-item calls into batched runner invocations.
  • fingerprint (feature fingerprint) — a 128-bit structural hash of any Serialize value, built on BLAKE3.
  • retryable (feature retryable) — retry-with-backoff around a fallible async operation.
  • bytes_decode (feature bytes_decode) — decodes a byte buffer to text, sniffing the BOM and falling back to UTF-8.

Modules§

error
The workspace error type and the helpers that build on it.
prelude
The names most marque code wants from this crate.

Macros§

api_bail
Returns early with a formatted ApiError, converted into the caller’s error type via .into().
api_error
Builds a formatted ApiError without returning.
client_bail
Returns early with a formatted Error::client.
client_error
Builds a formatted Error::client without returning.
internal_bail
Returns early with a formatted Error::internal_msg.
internal_error
Builds a formatted Error::internal_msg without returning.