Expand description
§Pipecircuit
HERE BE DRAGONS
You probably shouldn’t be using this, yet.
Correct. Robust. Fast. Portable.
Pick four.
A Rust framework for software development that’s strict enough to hand to an agent, with performance you’ll be proud to ship.
The storage feature provides bounded primary-indexed structure-of-arrays
through pipecircuit::storage::warp_table. The default
secondary-indexes feature adds declared Roaring-backed secondary indexes,
fluent set-algebra queries over opaque selections, and ordered selections
ranked by bit-sliced range indexes. Query results resolve to
flat generated row references containing id beside the declared row fields;
internal stable membership and bitmap representations never enter the public
query surface.
The present storage and secondary-query implementation uses alloc. A future
feature boundary should let consumers select fixed-capacity and alloc-backed
storage/query facilities independently; the current API does not pre-empt that
design.
A Pipe names independent inbound and outbound semantic families. An
InstalledPipe<Protocol, Transport> installs concrete access to that contract.
A local implementation can be a core machine that does not implement Pipe:
use pipecircuit::{Inline, InstalledPipe, Pipe, StateMachine, StepInputOf};
struct Counter(u8);
impl StateMachine for Counter {}
struct Read;
impl StepInputOf<Counter> for Read {
type Outcome = u8;
fn step(self, counter: &mut Counter) -> u8 { counter.0 }
}
struct Counting;
impl Pipe for Counting {
type In<'message> = Read;
type Out<'message> = u8;
}
let mut installed = InstalledPipe::<Counting, _>::new(Inline::for_pipe(Counter(7)));
assert_eq!(installed.send(Read), 7);Inline proves one synchronous step returns exactly the pipe’s output.
Other transports implement TransportTo and TransportFrom independently:
submission is a physical fact, not a promise of an immediate semantic response.
A foreign program can fulfill the contract without running Pipecircuit.
The 0.0.17 API renames Participant to Pipe, the former installed Pipe
to InstalledPipe, and DuplexFitting to DuplexTransport. PipeIn and
PipeOut select directional codec families. Inline::new retains the direct
machine-as-contract form; Inline::for_pipe selects a separate contract.
Re-exports§
pub use transport::Inline;
Modules§
Macros§
- value_
wrapper - Declares a single-private-field newtype, and provides
new()andvalue()associated fns
Structs§
- After
- Binding
Description - Cancelled
Continuation Completion - Cancelled
Continuation Work - Continuation
Admission - Continuation
ArmMismatch - Continuation
ArmRefusal - Continuation
Cancellation Mismatch - Continuation
Completion - Continuation
Expiration - Continuation
Id - Continuation
Ledger - Continuation
Ledger Creation Error - Continuation
Reply - The one reply still owed after a worker consumes its input. Expiry at the requester does not cancel the worker’s effects; its eventual completion is classified by the original ledger and deadline.
- Continuation
Work - Continuation
Work Cancellation Mismatch - Continued
- Declaration
Location - Location of the declaration that produced inspection metadata, not a wire identity.
- Delay
Admission - Delay
ArmMismatch - Delay
ArmRefusal - Delay
Ledger - Delay
Ledger Creation Error - Delayed
- Elapsed
Timer Tokens - Empty
Elapsed Timer Tokens - Encoded
Byte Count - The byte count written by a message encoder.
- Fallible
Admission - Adds a fallible gate while preserving the handler’s exact conduction failure. The gate sees only shared policy and peer views; its captured state may mutate.
- Inline
Submission - The inline step has already produced exactly one semantic output.
- Installed
Pipe - Owed
- Owned
Message - Selects one owned message type as a lifetime-indexed family.
- Pending
Routes - Bounded siblings retained only within one synchronous conduction scope. Capacity counts waiting destinations, excluding the active destination.
- Pipe
Description - Compiler-resolved protocol families. Type names are diagnostic labels only.
- PipeIn
- Selects the message family accepted by an input pipe.
- PipeOut
- Pipecircuit
- Submit
With - Explicitly settle an active transport’s submission. Success ends this synchronous circulation; it does not claim peer consumption or completion.
- Synchronized
View - Timer
ArmOutcome - Timer
Cancellation Outcome - Timer
Token - Wake
After
Enums§
- Admission
Failure - An admission refusal is distinct from failure after an output was admitted.
- Apply
Synchronized View Change Outcome - Apply
Synchronized View Revision Span Outcome - Apply
Synchronized View Snapshot Outcome - Atomic
Operation Outcome - Circuit
Flow Outcome - Circuit
Reaction Outcome - Circuit
Send Outcome - Conduction
Failure - Continuation
Admission Outcome - Continuation
ArmOutcome - Continuation
Cancellation Outcome - Continuation
Expiration Outcome - Continuation
Failure - Continuation
Ledger Creation Failure - Continuation
Refusal Outcome - Continuation
Resolution Outcome - Continuation
Retraction Outcome - Continuation
Unavailable - Continuation
Work Cancellation Outcome - Delay
Admission Outcome - Delay
ArmOutcome - Delay
Ledger Creation Failure - Delay
Refusal Outcome - Delay
Release Outcome - Delay
Unavailable - Delay
Withdrawal Outcome - Drive
Failure - Flow
Failure - Undispatched siblings remain in the caller’s PendingRoutes on every exit. A refused fanout is returned whole, before any of its children were sent.
- Intake
Admission - Physical intake permission for the next bounded decoding or dequeue step. This is not a semantic refusal and does not reserve storage by itself.
- NoActivation
- Inline steps have no independently driven source of activity.
- NoInput
- NoOutput
- Receive
From Outcome - Route
- The already-decided destinations of one semantic emission.
- Synchronized
View Read - Synchronized
View Snapshot Required Reason - Timer
- Timer
ArmDecision - Timer
ArmRefusal - Timer
Cancellation Decision - Timer
Cancellation Refusal - TimerIn
- Timer
Out - Wake
Precision
Traits§
- Admission
Handler - A scoped handler that can attach an explicit intake decision. The policy and
peer types supply read-only inspection to the gate without erasing borrows.
Gate-owned state can mutate through its
FnMutcapture; the gate cannot replace peer bindings or submit work through their exclusive references. - Admitted
Pipe Driver - A driver with a documented admission boundary for bounded intake.
- Circuit
- Describe
Bindings - Experimental inspection metadata; not a finalized consumer API. Physical descriptions tied to the same semantic roster by associated type. Generated implementations inspect types, without driving or allocating. Handwritten implementations must enumerate every roster role in declaration order, with its exact name and the actual installed binding and driver types.
- Describe
Roster - Experimental inspection metadata; not a finalized consumer API. Opt-in inspection generated from the same roster as addressed messages. Handwritten implementations must enumerate every role in declaration order. This describes boundaries; it does not infer route behavior or reachable outputs.
- Duplex
Transport - Intake
Gate - A circuit checks its reserved storage before allowing a source to advance.
The context is physical (for example a connection identity), not a field
added to the semantic protocol. A single-threaded handler must preserve the
capacity it checked until it settles the admitted output.
Errrefuses the intake as a failure, not a retryable pause; drivers preserve that failure through their conduction error path. Physical work before intake may already have progressed. Report refusal before advancing the gated dequeue or decoding step. - Message
Decoder - Proves that one serialized message can become a typed value.
- Message
Encoder - Proves that one lifetime-indexed message family can be serialized into bounded caller-owned storage.
- Message
Family - A lifetime-indexed family of values that may be encoded or decoded.
- Pipe
- A nominal duplex semantic contract, independent of its implementation and transport. Submission does not imply a synchronous response; either direction may be uninhabited.
- Pipe
Binding - Contract identity and driver access for an installed physical pipe. Wrappers expose the same driver used for their physical capabilities.
- Pipe
Driver - A concrete installed transport’s activation and scoped conduction surface.
- Pipe
Output Handler - Consumes an output before the driver’s receive storage can be recycled.
- Pipe
Role - One nominal role in a program. Two roles may expose the same pipe protocol.
- Pipe
Roster - The message families and complete ordered role list from one declaration.
- Pipe
Sender - A send that finishes borrowing its input before returning. A carrier may retain owned storage for a partial write, but cannot retain this reference.
- Reactor
- Scoped
Sender - Sending within one message scope. The exact carrier outcome remains visible.
- State
Machine - Step
Input Of - Submission
Policy - Classifies a concrete transport submission without choosing a semantic route. The output is the installed pipe’s output family, not an addressed destination. Application completion remains a separate, explicit conduction policy.
- Switchboard
- Synchronized
View Revision - Transport
From - Transport
To - Moves one value into a particular pipe boundary.