Skip to main content

Crate keel_core_api

Crate keel_core_api 

Source
Expand description

Keel core API contract (contracts-v1).

The single source of truth for the envelope types is contracts/core_api.rs; the crate compiles the vendored crate-local copy (contract/core_api.rs) so cargo package produces a self-contained crate, and build.rs asserts on every workspace build that the copy is byte-identical to the frozen contract file, so they can never drift. The policy module is the shared typed model of contracts/policy.schema.json, used by both the stub and the real core so their configuration semantics cannot diverge.

Modules§

policy
Typed policy model: keel.toml (in its JSON form) deserialized straight into structs. Validation is the type system — NonZero* integers make zero counts unrepresentable, newtypes parse duration/rate/schedule literals in their Deserialize impls, and retry conditions are a closed enum. A document that deserializes is a valid policy; anything else is KEEL-E001 with a precise field path (via serde_path_to_error).

Structs§

KeelError
Configuration/internal error (e.g. from configure).
Outcome
The result of execute: what happened after the full layer chain ran.
OutcomeError
Terminal error surfaced in an Outcome.
Request
One intercepted call, as submitted by a front end to execute.

Enums§

AttemptResult
Result of ONE attempt, produced by the effect callback.
BreakerState
Circuit breaker state as observed after the call.
ErrorClass
Typed error classes adapters produce. The core never sees language exceptions — adapters classify into these before crossing the boundary.
ErrorCode
Stable error taxonomy. String forms (“KEEL-E001”) appear in envelopes, logs, and keel explain; numeric values are frozen in core-ffi.h.

Constants§

ENVELOPE_VERSION

Traits§

KeelCore
The logical core surface. The real core implements this behind the C ABI in core-ffi.h; keel-core-stub implements it in-memory. Python/Node stubs mirror the same four operations on native values.