Expand description
Core implementations for the vox connectivity layer.
This crate provides concrete implementations of the traits defined in
vox_types:
BareConduit: wraps a rawLinkwith postcard serialization. No reconnect, no reliability. For localhost, SHM, testing.StableConduit(TODO): wraps a Link + seq/ack/replay with bytes-based replay buffer. Handles reconnect transparently.
Modules§
- testing
- Test utilities for vox-core. Publicly exported for use by integration tests in downstream crates.
Structs§
- Accepted
Connection - Result of accepting a virtual connection.
- Attachment
- One transport attachment consumed by
LinkSource::next_link. - Bare
Conduit - Wraps a
Linkwith postcard serialization. No reconnect, no reliability. - Bare
Conduit Permit - Bare
Conduit Rx - Bare
Conduit Tx - Client
Hello - Client’s opening handshake — fixed-size, cast directly from wire bytes.
- Connection
Handle - Connection
State - Static data for one active connection.
- Driver
- Per-connection driver. Tracks in-flight request attempts, dispatches
incoming requests to a
Handler, and manages channel state / flow control. - Driver
Caller - Implements
Caller: allocates a request ID, registers a response slot, sends one request attempt through the connection, and awaits the corresponding response. - Driver
Channel Sink - Concrete
ChannelSinkbacked by aConnectionSender. - Driver
Reply Sink - Concrete
ReplySinkimplementation for the driver. - InMemory
Operation Store - Default in-memory operation store.
- Memory
Link - In-process
Linkbacked by tokio mpsc channels. - Memory
Link Rx - Receiving half of a
MemoryLink. - Memory
Link RxError - MemoryLink never fails on recv — the only “error” is channel closed (returns None).
- Memory
Link Tx - Sending half of a
MemoryLink. - Memory
Link TxPermit - Memory
Write Slot - Write slot for
MemoryLinkTx. - Message
Plan - Pre-built translation plan for deserializing the
Messagewire type. - Noop
Caller - Liveness-only handle for a connection root.
- Sealed
Response - A sealed response stored in the operation store.
- Session
- Session state machine.
- Session
Acceptor Builder - Session
Handle - Cloneable handle for opening and closing virtual connections.
- Session
Initiator Builder - Session
Keepalive Config - Session-level protocol keepalive configuration.
- Session
Registry - Session
Source Initiator Builder - Session
Transport Acceptor Builder - Session
Transport Initiator Builder - Single
Attachment Source - A one-shot
LinkSourcebacked by a single attachment. - Split
Link - Link wrapper that re-combines pre-split Tx/Rx halves into a
Link. - Stable
Conduit - Stable
Conduit Permit - Stable
Conduit Rx - Stable
Conduit Tx
Enums§
- Bare
Conduit Error - Handshake
Error - Operation
State - State of an operation in the store.
- Session
Accept Outcome - Session
Error - Errors that can occur during session establishment or operation.
- Stable
Conduit Error - Transport
Mode - Requested conduit mode for the transport prologue.
- Transport
Prologue Error - Transport
Reject Reason
Traits§
- Connection
Acceptor - Callback for accepting or rejecting inbound virtual connections.
- DynConduit
Rx - DynConduit
Tx - Into
Conduit - Converts a value into a
vox_types::Conduit. - Link
Source - Operation
Store - Operation state backing for exactly-once delivery across session resumption.
Functions§
- accept_
transport - acceptor_
conduit - acceptor_
on - acceptor_
on_ link - Convenience: perform CBOR handshake as acceptor on a raw link, then return a builder with the conduit ready to go.
- acceptor_
transport - exhausted_
source - Build an already-exhausted
LinkSource. Any call tonext_linkwill fail immediately. Used when the first link is passed directly toStableConduit::with_first_linkand no reconnection source is available. - handshake_
as_ acceptor - Perform the CBOR handshake as the acceptor.
- handshake_
as_ initiator - Perform the CBOR handshake as the initiator.
- initiate_
transport - initiator
- initiator_
conduit - initiator_
on - initiator_
on_ link - Convenience: perform CBOR handshake as initiator on a raw link, then return a builder with the conduit ready to go.
- initiator_
transport - memory_
link_ pair - Create a pair of connected
MemoryLinks. - prepare_
acceptor_ attachment - Prepare an acceptor-side attachment from an inbound link.
- proxy_
connections - Forward all request/channel traffic between two connections.
- recv_
client_ hello - Receive a stable conduit
ClientHellofrom a link. - reject_
transport - single_
attachment_ source - Build a one-shot
LinkSourcefrom a prepared attachment. - single_
link_ source - Build a one-shot initiator-side
LinkSourcefrom a raw link.
Type Aliases§
- BoxSession
Future - A pinned, boxed session future. On non-WASM this is
Send + 'static; on WASM it’s'staticonly (noSendrequirement).