Expand description
Reusable, pure actors and behavior compositions built on behavior.
The public taxonomy follows actor-system semantics: atomic, composition,
lifecycle, routing, discovery, time,
persistence, workflow, and operations. Every template is a
deterministic fold from one concrete event sum to explicit typed
behavior::Actions. It performs no scheduling, delivery, allocation, observation,
persistence, or I/O itself. Those effects remain inputs and named output
lanes for Bombay’s one universal Driver and statically selected Environment
interpreters.
Public behavior::Protocol identity remains orthogonal to those internal event and
effect algebras. Concrete actor templates declare their protocol; transparent
wrappers preserve B::Protocol and do not become new recipient identities.
behavior::BirthProtocols projects each template’s own protocol and
complete transitive staged-birth protocols into one closed structural
product. Delivery-only external protocols do not enter that product.
behavior::LogicalHostRequirements separately derives every intentional logical
destination from the concrete sends algebra and every transitive birth.
The projection preserves repeated occurrences and excludes exact,
creator-local, and interpreter-owned lanes; it is static proof metadata,
not a host registry or runtime lookup.
Catalogue values and wrappers are constructed directly through their public
owning-type constructors. Activate consumes any concrete definition
into its one initialized Active state. Rust can infer wrapper stacks at
construction and spawn call sites; applications do not need to name types
such as Deadline<Stash<Machine<...>>>.
Correctness-sensitive cross-family orders use ordinary typed nesting and
actor communication. The repository’s composition guide records their
construction, error, initialization, and effect-preservation laws.
The top-level Bombay package is the ordinary application façade. Direct use of this component crate is intended for interpreter implementation, component tests, and advanced framework extension.
Timer wrappers expose their shared event and reaction equations directly; template-specific aliases do not create nominal distinctions.
fn accepts_timer_reactions<B: behavior::Behavior>(
_: behavior_actors::TimedReaction<B>,
_: behavior_actors::DeadlineReaction<B>,
) {
}Foundational algebra stays owned by the bombay-behavior package.
fn unavailable(_: behavior_actors::Actions<
behavior::MailAddr,
behavior::Never,
behavior::NoSends,
behavior::NoBirths,
>) {}Re-exports§
pub use composition::DeliveryRoute;pub use composition::MessageAdapter;pub use composition::MessageAdapterWithRoute;pub use composition::ReplyDeliveries;pub use composition::ReplyDelivery;pub use composition::ReplyRoute;pub use discovery::Presence;pub use discovery::PresenceEntry;pub use discovery::PresenceError;pub use discovery::PresenceMessage;pub use discovery::PresenceOutcome;pub use discovery::PresencePhase;pub use discovery::PresenceReply;pub use discovery::PresenceReport;pub use discovery::PresenceSends;pub use discovery::PresenceVersion;pub use discovery::PubSub;pub use discovery::PubSubError;pub use discovery::PubSubMessage;pub use discovery::Registry;pub use discovery::RegistryError;pub use discovery::RegistryMessage;pub use discovery::RegistryResult;pub use discovery::Resolution;pub use discovery::Resolver;pub use discovery::ResolverConfigError;pub use discovery::ResolverMessage;pub use discovery::Topic;pub use discovery::TopicError;pub use discovery::TopicMembership;pub use discovery::TopicMessage;pub use lifecycle::BeginShutdownPhases;pub use lifecycle::ChildCreationExpectation;pub use lifecycle::ChildShutdownPhases;pub use lifecycle::ChildShutdownPlanError;pub use lifecycle::ChildTermination;pub use lifecycle::DeclareShutdownPhase;pub use lifecycle::EstablishedTerminationMonitor;pub use lifecycle::EstablishedTerminationReaction;pub use lifecycle::EstablishedTerminationTarget;pub use lifecycle::FinishShutdownPhases;pub use lifecycle::HeterogeneousShutdownCoordinator;pub use lifecycle::HeterogeneousShutdownPlan;pub use lifecycle::HeterogeneousShutdownSends;pub use lifecycle::InstallShutdownPlan;pub use lifecycle::LogicalTerminationTarget;pub use lifecycle::NoShutdownTargets;pub use lifecycle::PeerTermination;pub use lifecycle::PropagateTermination;pub use lifecycle::ReportShutdownPlan;pub use lifecycle::ShutdownChoice;pub use lifecycle::ShutdownCoordinator;pub use lifecycle::ShutdownCoordinatorError;pub use lifecycle::ShutdownCoordinatorEvent;pub use lifecycle::ShutdownPlan;pub use lifecycle::ShutdownPlanError;pub use lifecycle::ShutdownState;pub use lifecycle::ShutdownTargetAt;pub use lifecycle::ShutdownTree;pub use lifecycle::ShutdownTreeError;pub use lifecycle::Task;pub use lifecycle::TaskError;pub use lifecycle::TaskMessage;pub use lifecycle::TaskResult;pub use lifecycle::TaskState;pub use lifecycle::TerminalDisposition;pub use lifecycle::TerminalPropagationPolicy;pub use lifecycle::TerminalPropagationSends;pub use lifecycle::TerminalPropagationState;pub use lifecycle::TerminationMonitor;pub use lifecycle::TerminationMonitorError;pub use lifecycle::TerminationMonitorWith;pub use lifecycle::TerminationObservation;pub use lifecycle::TerminationObservationTarget;pub use lifecycle::TerminationPropagationError;pub use lifecycle::TerminationReaction;pub use lifecycle::TerminationTarget;pub use lifecycle::propagate_abnormal;pub use lifecycle::propagate_all;pub use lifecycle::shutdown_after_children;pub use lifecycle::shutdown_target;pub use operations::ComponentHealth;pub use operations::ComponentHealthState;pub use operations::Configuration;pub use operations::ConfigurationError;pub use operations::ConfigurationMessage;pub use operations::ConfigurationState;pub use operations::ConfigurationVersion;pub use operations::DependencyReadiness;pub use operations::Feature;pub use operations::FeatureSet;pub use operations::FeatureStatus;pub use operations::Health;pub use operations::HealthError;pub use operations::HealthEvidence;pub use operations::HealthMessage;pub use operations::HealthReport;pub use operations::HealthStatus;pub use operations::ObservationVersion;pub use operations::Readiness;pub use operations::ReadinessError;pub use operations::ReadinessEvidence;pub use operations::ReadinessMessage;pub use operations::ReadinessReport;pub use operations::ReadinessStatus;pub use persistence::Cache;pub use persistence::CacheConfigError;pub use persistence::CacheConfiguration;pub use persistence::CacheEntry;pub use persistence::CacheMessage;pub use persistence::CacheResult;pub use persistence::CacheState;pub use routing::AcknowledgementError;pub use routing::AcknowledgementInput;pub use routing::AcknowledgementMessage;pub use routing::AcknowledgementOutcome;pub use routing::AcknowledgementRecord;pub use routing::AcknowledgementState;pub use routing::Acknowledgements;pub use routing::BreakerAttempt;pub use routing::BreakerCompletion;pub use routing::BreakerConfigError;pub use routing::BreakerError;pub use routing::BreakerMessage;pub use routing::BreakerOutcome;pub use routing::BreakerPhase;pub use routing::BreakerRejection;pub use routing::BreakerSends;pub use routing::Buffer;pub use routing::BufferConfigError;pub use routing::BufferConfiguration;pub use routing::BufferMessage;pub use routing::BufferOutcome;pub use routing::BufferRejection;pub use routing::BufferState;pub use routing::Buffered;pub use routing::CircuitBreaker;pub use routing::ClosedPhase;pub use routing::ConsistentHash;pub use routing::CorrelationResult;pub use routing::CorrelationState;pub use routing::Correlator;pub use routing::CorrelatorError;pub use routing::CorrelatorMessage;pub use routing::Deduplicator;pub use routing::DeduplicatorConfigError;pub use routing::DeduplicatorMessage;pub use routing::DeduplicatorOutcome;pub use routing::DeduplicatorState;pub use routing::DeliveryOutcomes;pub use routing::LeastLoaded;pub use routing::Load;pub use routing::LoadEvidence;pub use routing::LoadObservation;pub use routing::LoadVersion;pub use routing::MemberEvidenceError;pub use routing::MemberToken;pub use routing::MemberTokenEvidence;pub use routing::MemberTokenObservation;pub use routing::MemberTokenVersion;pub use routing::OrderGate;pub use routing::OrderGateMessage;pub use routing::OrderGateOutcome;pub use routing::OrderGateState;pub use routing::OverflowPolicy;pub use routing::PriorityQueue;pub use routing::PriorityQueueConfigError;pub use routing::PriorityQueueMessage;pub use routing::PriorityQueueOutcome;pub use routing::PriorityQueueRejection;pub use routing::PriorityQueueState;pub use routing::ProbePhase;pub use routing::RateLimitRejection;pub use routing::RateLimiter;pub use routing::RateLimiterConfigError;pub use routing::RateLimiterMessage;pub use routing::RateLimiterOutcome;pub use routing::RateLimiterState;pub use routing::RendezvousHash;pub use routing::RoundRobin;pub use routing::RouteKey;pub use routing::Router;pub use routing::RouterError;pub use routing::RouterMessage;pub use routing::RoutingObservationRejection;pub use routing::RoutingStrategy;pub use routing::Sequence;pub use routing::Sequencer;pub use routing::SequencerMessage;pub use routing::SequencerOutcome;pub use routing::SequencerState;pub use routing::TokenCount;pub use routing::WorkQueue;pub use routing::WorkQueueMessage;pub use routing::WorkQueueOutcome;pub use routing::WorkQueueRejection;pub use routing::WorkQueueSends;pub use routing::WorkQueueState;pub use time::Deadline;pub use time::DeadlineReaction;pub use time::Lease;pub use time::LeaseMessage;pub use time::LeaseOutcome;pub use time::LeaseRejection;pub use time::LeaseRequest;pub use time::LeaseSends;pub use time::LeaseState;pub use time::OneShot;pub use time::Periodic;pub use time::ReceiveTimeout;pub use time::TimedEvent;pub use time::TimedReaction;pub use workflow::Barrier;pub use workflow::BarrierArrival;pub use workflow::BarrierConfigError;pub use workflow::BarrierError;pub use workflow::BarrierGeneration;pub use workflow::BarrierMembership;pub use workflow::BarrierMessage;pub use workflow::BarrierReleased;pub use workflow::BarrierState;pub use workflow::Latch;pub use workflow::LatchMessage;pub use workflow::LatchReleased;pub use workflow::LatchState;pub use workflow::Workflow;pub use workflow::WorkflowConfigError;pub use workflow::WorkflowDefinition;pub use workflow::WorkflowError;pub use workflow::WorkflowInput;pub use workflow::WorkflowMessage;pub use workflow::WorkflowOutcome;pub use workflow::WorkflowRejection;pub use workflow::WorkflowState;pub use workflow::WorkflowStepState;
Modules§
- atomic
- Atomic actor families with one independent behavior per aggregate.
- composition
- Fundamental concrete behavior compositions.
- discovery
- Typed name binding, lookup, and subscription behaviors.
- lifecycle
- Lifecycle observation, application-root, terminal-result, and graceful-shutdown behaviors.
- operations
- Operational policies over typed application and runtime observations.
- persistence
- Pure policies derived from durable or retained state.
- routing
- Deterministic recipient selection and delivery-policy behaviors.
- time
- Pure time domains and behavior adapters.
- workflow
- Pure multi-party coordination and demand-driven stream compositions.
Structs§
- Active
- A behavior whose initialization fold has completed exactly once.
- Cancel
Observation - One affine attempt to cancel the exact accepted relationship.
- Child
Shutdown Rejected - Explicit failed resolution of one
ShutdownChildrequest. - Child
Stopped - Creation
Resolved - The committed result of one staged
behavior::CreateChildrequest. - Established
Child - Both capabilities established by one committed named-child creation.
- Finalize
OnShutdown - Run one explicit final fold and then stop normally.
- Initialized
- An initialized behavior and the effects that must be interpreted before its first mailbox turn.
- Machine
- Machine
Error - Controlled machine rejection with the complete unaccepted mailbox input.
- Observation
Authority - Affine permission to attempt cancellation of one exact relationship.
- Observation
Id - Behavior-owned correlation for one observation relationship.
- Observation
Relationship - Non-authorizing identity of one accepted protocol-indexed relationship.
- Observe
Child - Ask the local interpreter to observe the exact child generation of protocol
Pbound at one creator-local creation ID. - Observe
Creation - Ask the local interpreter to return the committed result of the same-action creation ID through the behavior’s typed creation-result lane.
- Observe
Established - One affine request for exact protocol-indexed termination observation.
- Observe
Established Creation - Request the exact committed result of a same-action creation at one named creator-local role.
- Observe
Peer - Ask the local interpreter to observe the exact peer incarnation selected at
peerwhen this request is interpreted. - Peer
Stopped - Report
Terminal Outcome - Ask the interpreter to publish one exact terminal outcome for the emitting incarnation before interpreting the same action’s terminal verdict.
- Schedule
After - Request scheduling relative to the interpreter’s clock.
- Schedule
At - Shutdown
Child - Ask the local interpreter to begin orderly shutdown of one established
child of protocol
Cin the emitting actor’s namespace. - Shutdown
Established - Request orderly shutdown of one exact installed concrete behavior.
- Shutdown
Id - Behavior-owned correlation for one orderly-shutdown request.
- Shutdown
Requested - A request to finish through one serialized behavior transition.
- Stash
- FIFO message holding for an infallible inner fold.
- Stop
OnShutdown - Stop normally when the shutdown lane is received.
- Timer
Elapsed - Timer
Generation - TimerId
- Timer
Scheduled - Exact timer correlation accepted by the local scheduler.
- Unwatch
Peer - Ask the local interpreter to cancel this actor’s observation of
peer. - Watch
- Observe a logical peer name across any number of later incarnations.
Enums§
- Child
Shutdown Rejection - Why a local child-shutdown request was not accepted.
- Crash
- Why execution terminated without a behavior-requested stop.
- Established
Observation - Whole protocol-indexed observation and cancellation receipts.
- Established
Shutdown Resolved - Complete immediate resolution of one exact orderly-shutdown request.
- Exit
- A successfully observed actor termination.
- Move
- Observation
Operation - Operation correlated by an
ObservationId. - Observation
Rejection - Semantic rejection of an exact observation operation.
- Peer
Observation Rejection - Exact reason a logical peer observation was not established.
- Restart
Denial - Why an otherwise eligible replacement set was denied.
- Schedule
After Rejection - Exact reason a relative timer request was rejected before scheduling.
- Schedule
AtRejection - Exact reason an absolute timer request was rejected before scheduling.
- Shutdown
Rejection - Semantic rejection of exact orderly shutdown.
- Stash
Route - Supervision
Failure Reason - Why a supervisor could no longer preserve its child topology.
Traits§
- Activate
- Consuming initialization for any concrete behavior definition.
- Interpret
Established Observation - Advanced-host transfer of the whole original requests and exact endpoint.
- Interpret
Established Shutdown - Public power-user boundary for exact orderly-shutdown transfer.
- Stash
Status - Semantic observation of the outermost composed stash, independent of its structural nesting depth.
- Statically
Infallible - Statically proven uninhabited transition error accepted by
Stash.
Functions§
- established_
child - Strengthen one successful named-child creation report without losing either of its routing capabilities.
- stop_
on_ abnormal_ death - Stop when a logical watch reports an abnormal outcome.
Type Aliases§
- Link
Reaction - Infallible reaction to one matching logical peer stop.
- Shutdown
Event - Internal event sum of a behavior that supports graceful shutdown.
- Shutdown
Reaction - A final shutdown fold. Its sends and fresh creations are retained, while
its become verdict is replaced with
Stop(Normal). - Terminal
Outcome - The authoritative terminal fact for one exact actor incarnation.
- Watch
Event - Complete event sum accepted by a logical peer watch.