Skip to main content

Crate vox_core

Crate vox_core 

Source
Expand description

Core implementations for the vox connectivity layer.

This crate provides concrete implementations of the traits defined in vox_types:

  • BareConduit: wraps a raw Link with 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§

AcceptorFn
Wrapper that turns a closure into a ConnectionAcceptor.
Attachment
One transport attachment consumed by LinkSource::next_link.
BareConduit
Wraps a Link with postcard serialization. No reconnect, no reliability.
BareConduitRx
BareConduitTx
Caller
Concrete caller type wrapping a DriverCaller with optional middleware.
ClientHello
Client’s opening handshake — fixed-size, cast directly from wire bytes.
ConnectionHandle
ConnectionRequest
Metadata wrapper with typed getters for well-known vox-* keys.
ConnectionState
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.
DriverCaller
Allocates a request ID, registers a response slot, sends one request attempt through the connection, and awaits the corresponding response.
DriverChannelSink
Concrete ChannelSink backed by a ConnectionSender.
DriverReplySink
Concrete ReplySink implementation for the driver.
InMemoryOperationStore
Default in-memory operation store.
MemoryLink
In-process Link backed by tokio mpsc channels.
MemoryLinkRx
Receiving half of a MemoryLink.
MemoryLinkRxError
MemoryLink never fails on recv — the only “error” is channel closed (returns None).
MemoryLinkTx
Sending half of a MemoryLink.
MessagePlan
Pre-built translation plan for deserializing the Message wire type.
NoopClient
Liveness-only client for a connection root.
PendingConnection
A connection that has been opened but not yet accepted.
SealedResponse
A sealed response stored in the operation store.
Session
Session state machine.
SessionAcceptorBuilder
SessionConfig
Shared configuration for all session builders.
SessionHandle
Cloneable handle for opening and closing virtual connections.
SessionInitiatorBuilder
SessionKeepaliveConfig
Session-level protocol keepalive configuration.
SessionRegistry
SessionSourceInitiatorBuilder
SessionTransportAcceptorBuilder
SessionTransportInitiatorBuilder
SingleAttachmentSource
A one-shot LinkSource backed by a single attachment.
SplitLink
Link wrapper that re-combines pre-split Tx/Rx halves into a Link.
StableConduit
StableConduitRx
StableConduitTx
StablePreparedMessage

Enums§

BareConduitError
HandshakeError
OperationState
State of an operation in the store.
SessionAcceptOutcome
SessionError
Errors that can occur during session establishment or operation.
StableConduitError
TransportMode
Requested conduit mode for the transport prologue.
TransportPrologueError
TransportRejectReason

Constants§

VOX_SERVICE_METADATA_KEY
Well-known metadata key for service name routing.

Traits§

ConnectionAcceptor
DynConduitRx
DynConduitTx
ErasedHandler
Object-safe version of Handler<DriverReplySink>.
FromVoxSession
Trait for constructing a typed client from a vox session.
IntoConduit
Converts a value into a vox_types::Conduit.
LinkSource
OperationStore
Operation state backing for exactly-once delivery across session resumption.
OutboundSendFuture

Functions§

accept_transport
acceptor_conduit
acceptor_fn
Create a ConnectionAcceptor from a closure.
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 to next_link will fail immediately. Used when the first link is passed directly to StableConduit::with_first_link and 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 ClientHello from a link.
reject_transport
single_attachment_source
Build a one-shot LinkSource from a prepared attachment.
single_link_source
Build a one-shot initiator-side LinkSource from a raw link.

Type Aliases§

BoxSessionFuture
A pinned, boxed session future. On non-WASM this is Send + 'static; on WASM it’s 'static only (no Send requirement).