Skip to main content

Crate pipecircuit

Crate pipecircuit 

Source
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§

storage
Opinionated storage facilities.
transport

Macros§

value_wrapper
Declares a single-private-field newtype, and provides new() and value() associated fns

Structs§

After
BindingDescription
CancelledContinuationCompletion
CancelledContinuationWork
ContinuationAdmission
ContinuationArmMismatch
ContinuationArmRefusal
ContinuationCancellationMismatch
ContinuationCompletion
ContinuationExpiration
ContinuationId
ContinuationLedger
ContinuationLedgerCreationError
ContinuationReply
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.
ContinuationWork
ContinuationWorkCancellationMismatch
Continued
DeclarationLocation
Location of the declaration that produced inspection metadata, not a wire identity.
DelayAdmission
DelayArmMismatch
DelayArmRefusal
DelayLedger
DelayLedgerCreationError
Delayed
ElapsedTimerTokens
EmptyElapsedTimerTokens
EncodedByteCount
The byte count written by a message encoder.
FallibleAdmission
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.
InlineSubmission
The inline step has already produced exactly one semantic output.
InstalledPipe
Owed
OwnedMessage
Selects one owned message type as a lifetime-indexed family.
PendingRoutes
Bounded siblings retained only within one synchronous conduction scope. Capacity counts waiting destinations, excluding the active destination.
PipeDescription
Compiler-resolved protocol families. Type names are diagnostic labels only.
PipeIn
Selects the message family accepted by an input pipe.
PipeOut
Pipecircuit
SubmitWith
Explicitly settle an active transport’s submission. Success ends this synchronous circulation; it does not claim peer consumption or completion.
SynchronizedView
TimerArmOutcome
TimerCancellationOutcome
TimerToken
WakeAfter

Enums§

AdmissionFailure
An admission refusal is distinct from failure after an output was admitted.
ApplySynchronizedViewChangeOutcome
ApplySynchronizedViewRevisionSpanOutcome
ApplySynchronizedViewSnapshotOutcome
AtomicOperationOutcome
CircuitFlowOutcome
CircuitReactionOutcome
CircuitSendOutcome
ConductionFailure
ContinuationAdmissionOutcome
ContinuationArmOutcome
ContinuationCancellationOutcome
ContinuationExpirationOutcome
ContinuationFailure
ContinuationLedgerCreationFailure
ContinuationRefusalOutcome
ContinuationResolutionOutcome
ContinuationRetractionOutcome
ContinuationUnavailable
ContinuationWorkCancellationOutcome
DelayAdmissionOutcome
DelayArmOutcome
DelayLedgerCreationFailure
DelayRefusalOutcome
DelayReleaseOutcome
DelayUnavailable
DelayWithdrawalOutcome
DriveFailure
FlowFailure
Undispatched siblings remain in the caller’s PendingRoutes on every exit. A refused fanout is returned whole, before any of its children were sent.
IntakeAdmission
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
ReceiveFromOutcome
Route
The already-decided destinations of one semantic emission.
SynchronizedViewRead
SynchronizedViewSnapshotRequiredReason
Timer
TimerArmDecision
TimerArmRefusal
TimerCancellationDecision
TimerCancellationRefusal
TimerIn
TimerOut
WakePrecision

Traits§

AdmissionHandler
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 FnMut capture; the gate cannot replace peer bindings or submit work through their exclusive references.
AdmittedPipeDriver
A driver with a documented admission boundary for bounded intake.
Circuit
DescribeBindings
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.
DescribeRoster
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.
DuplexTransport
IntakeGate
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. Err refuses 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.
MessageDecoder
Proves that one serialized message can become a typed value.
MessageEncoder
Proves that one lifetime-indexed message family can be serialized into bounded caller-owned storage.
MessageFamily
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.
PipeBinding
Contract identity and driver access for an installed physical pipe. Wrappers expose the same driver used for their physical capabilities.
PipeDriver
A concrete installed transport’s activation and scoped conduction surface.
PipeOutputHandler
Consumes an output before the driver’s receive storage can be recycled.
PipeRole
One nominal role in a program. Two roles may expose the same pipe protocol.
PipeRoster
The message families and complete ordered role list from one declaration.
PipeSender
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
ScopedSender
Sending within one message scope. The exact carrier outcome remains visible.
StateMachine
StepInputOf
SubmissionPolicy
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
SynchronizedViewRevision
TransportFrom
TransportTo
Moves one value into a particular pipe boundary.

Functions§

flow

Type Aliases§

ConductionResult
ContinuationResult
TimeoutAfter