Skip to main content

Crate qubit_cas

Crate qubit_cas 

Source
Expand description

Typed compare-and-swap executor for synchronous and asynchronous workflows.

CasExecutor<T, E> binds the shared state type T and operation error type E. Each execution call introduces its own business output type R, so one executor configuration can serve multiple CAS operations over the same state.

Re-exports§

pub use error::CasAttemptFailure;
pub use error::CasAttemptFailureKind;
pub use error::CasError;
pub use error::CasErrorKind;
pub use event::CasContext;
pub use event::CasEvent;
pub use event::CasHooks;
pub use executor::CasBuilder;
pub use executor::CasExecutor;
pub use fast::FastCas;
pub use fast::FastCasDecision;
pub use fast::FastCasError;
pub use fast::FastCasPolicy;
pub use fast::FastCasState;
pub use fast::FastCasSuccess;
pub use observability::CasAlert;
pub use observability::CasObservabilityConfig;
pub use observability::CasObservabilityMode;
pub use observability::ContentionThresholds;
pub use observability::ListenerPanicPolicy;
pub use report::CasExecutionOutcome;
pub use report::CasExecutionReport;
pub use strategy::CasStrategy;
pub use strategy::CasStrategyProfile;

Modules§

constants
Built-in CAS preset constants.
error
CAS error types.
event
CAS event context and hook types.
executor
CAS executor and builder modules and re-exports.
fast
Ultra-light compare-and-swap primitives for hot usize state paths.
observability
Observability configuration for CAS execution.
report
Execution reports produced by CAS flows.
strategy
CAS retry strategy presets.

Structs§

CasOutcome
Public return value for one CAS execution.

Enums§

CasDecision
Decision returned by one CAS operation attempt.
CasSuccess
Successful result returned by crate::CasExecutor.