Skip to main content

Crate jetstream_rpc

Crate jetstream_rpc 

Source
Expand description

§JetStream Rpc

Defines Rpc primitives for JetStream. Of note is the Protocol trait which is meant to be used with the service attribute macro.

client::ClientTransport and server::ServiceTransport describe one ordered frame sequence. session describes the thing that can open another one: a session::Session is the association with a peer, and a lane is one sequence obtained from it — which is what those two traits already are. See the guide at https://sevki.github.io/jetstream/sessions.html.

Re-exports§

pub use framer::*;

Modules§

client
context
framer
server
session
Sessions and lanes.
subscription
Wire pieces for subscriptions.

Structs§

Framed
A unified Stream and Sink interface to an underlying I/O object, using the Encoder and Decoder traits to encode and decode frames.
Mux
Client Mux
Rerror
Rlerror
Router
RpcCall
RpcStream
The caller’s end of a subscription: many responses under one tag.
Rversion
version – negotiate protocol version
TagPool
r[impl jetstream.subscription.cancel] Three regions of the tag space, not one pool.
Tversion
version – negotiate protocol version

Enums§

Encoding
EncodingError
ErrorFrame
RpcFuture
Either a call that reached the lane, or one that could not.
Version
VersionFrame
Waiter
What is waiting on a tag.

Constants§

HEADER_KEY_JETSTREAM_PROTO
MIMETYPE_JETSTREAM
MIMETYPE_JSON
MIMETYPE_OCTET_STREAM
MIMETYPE_XML
RERROR
r[impl jetstream.error.v2.wireformat.error-frame] A global id, below MESSAGE_ID_START, like every other id in this frame.
RJETSTREAMERROR
RLERROR
RVERSION
TVERSION

Traits§

AnyServer
Decoder
Decoding of frames via buffers.
Encoder
Trait of helper objects to write out messages as bytes, for use with FramedWrite.
Handler
Incoming
IntoError
IntoError trait allows conversion of various error types into Jetstream Error.
Message
A trait representing a message that can be encoded and decoded.
Protocol
Defines the request and response types for the JetStream protocol.

Functions§

error_to_rmessage

Type Aliases§

Error
InFlight
RxStream
TxSink