Skip to main content

Crate roam_core

Crate roam_core 

Source
Expand description

Core implementations for the roam connectivity layer.

This crate provides concrete implementations of the traits defined in roam_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.

Structs§

AcceptedConnection
Result of accepting a virtual connection.
Attachment
One transport attachment consumed by LinkSource::next_link.
BareConduit
Wraps a Link with postcard serialization. No reconnect, no reliability.
BareConduitPermit
BareConduitRx
BareConduitTx
ConnectionHandle
ConnectionState
Static data for one active connection.
Driver
Per-connection driver. Handles in-flight request tracking, dispatches incoming calls to a Handler, and manages channel state/flow control.
DriverCaller
Implements Caller: allocates a request ID, registers a response slot, sends the call through the connection, and awaits the response.
DriverChannelSink
Concrete ChannelSink backed by a ConnectionSender.
DriverReplySink
Concrete ReplySink implementation for the driver.
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.
MemoryLinkTxPermit
MemoryWriteSlot
Write slot for MemoryLinkTx.
NoopCaller
Liveness-only handle for a connection root.
Session
Session state machine.
SessionAcceptorBuilder
SessionHandle
Cloneable handle for opening and closing virtual connections.
SessionInitiatorBuilder
SessionKeepaliveConfig
Session-level protocol keepalive configuration.
SplitLink
Link wrapper that re-combines pre-split Tx/Rx halves into a Link.
StableConduit
StableConduitPermit
StableConduitRx
StableConduitTx

Enums§

BareConduitError
SessionError
Errors that can occur during session establishment or operation.
StableConduitError

Constants§

PROTOCOL_VERSION
Current roam session protocol version.

Traits§

ConnectionAcceptor
Callback for accepting or rejecting inbound virtual connections.
DynConduitTx
IntoConduit
Converts a value into a roam_types::Conduit.
LinkSource

Functions§

acceptor
initiator
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.
rpc_plan
Return a process-global cached &'static RpcPlan for type T. FIXME: requiring ’static here is wrong FIXME: this function is now useless since we have RpcPlan::for_type

Type Aliases§

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