Skip to main content

Crate bombay_entity

Crate bombay_entity 

Source
Expand description

Local, in-memory activation and stable routing for entities.

An entity is addressed by a stable EntityId, while its actor incarnation may be activated, drained, passivated, and later replaced. This crate owns that lifecycle. Actor execution, business behavior, persistence, discovery, and distributed consensus remain separate concerns.

The runtime implements this state machine:

Inactive
  -> Activating(generation)
  -> Active(generation, actor reference)
  -> Draining(generation)
  -> Retiring(generation)
  -> Inactive

Generation checks prevent late activation or termination events from an old incarnation from changing the binding for a newer incarnation.

Structs§

Activated
Exact-incarnation capabilities returned by transactional activation.
ActivatingSlot
Opaque state of one directory-owned activation and its bounded waiters.
ActivationId
Globally unique identity of one activation attempt and incarnation.
ActiveSlot
Opaque state of one committed and admitting incarnation.
Decision
The value produced by one deterministic reduction.
DirectoryConfig
Fixed sizing and admission limits for a local directory.
DirectoryOutput
One installed lifecycle decision awaiting effect interpretation.
DispatchId
Identity of one dispatch operation within a slot.
DispatchOutput
The installed decision for one dispatched command, with its guaranteed correlation identity.
DrainFailure
Classification attached to forced retirement.
DrainFenceAcknowledged
Confirmation that an entity drain fence reached its behavior transition.
DrainingSlot
Opaque state of one incarnation whose admission is closed.
EntityBehavior
Entity-runtime protocol composition around an application behavior.
EntityId
A stable, typed identifier for an entity.
EntityRuntime
Local stable-routing facade used by applications.
LifecycleOutput
Output of one executable lifecycle-machine step.
LocalDirectory
Sharded local storage for authoritative per-entity lifecycle machines.
SlotEffectBatch
Ordered monoidal collection of slot effects.
SlotReducer
Pure reducer for one stable entity slot.

Enums§

DirectoryError
Failure before a command can be submitted to a lifecycle machine.
DispatchFailure
Failure from EntityRuntime::dispatch with command ownership preserved.
DrainStage
Stage at which a bounded drain failed.
EntityEvent
Complete event protocol for an entity-wrapped behavior.
EntityProtocol
Commands accepted by an entity-wrapped behavior.
EntitySlot
Pure state of one stable entity routing slot.
FenceFailure
Stage at which an ordered fence operation failed.
LifecycleEdge
Authoritative identity of one phase-changing lifecycle edge.
LifecyclePhase
Stable lifecycle phase identity.
LifecycleTopologyError
Lifecycle-specific structural validation failure.
LifecycleTrigger
Stable identity of an input relevant to lifecycle topology.
Passivation
Outcome of one EntityRuntime::passivate call.
Refusal
Typed reason why a command was not admitted.
RetirementMode
Retirement mode granted to the slot interpreter.
SlotEffect
Request emitted by the pure entity-slot state machine.
SlotEvent
External fact submitted to one entity slot.
TransitionEvidence
Evidence produced by one lifecycle execution.

Constants§

LIFECYCLE_TOPOLOGY
Authoritative lifecycle topology.

Traits§

EffectInterpreter
Runtime capabilities used to interpret lifecycle effects.
LocalEntityRuntime
Runtime port implemented once by an actor runtime integration.
Reducer
A deterministic transition algebra.

Functions§

lifecycle_machine
Construct an inactive entity lifecycle machine.
validate_lifecycle_topology
Validate graph properties and required entity lifecycle invariants.

Type Aliases§

LifecycleMachine
Representable executable lifecycle machine for one stable entity slot.
SlotDecision
Result of one deterministic entity-slot reduction.