Crate wireframe

Crate wireframe 

Source
Expand description

Public API for the wireframe library.

This crate provides building blocks for asynchronous binary protocol servers, including routing, middleware, and connection utilities.

Re-exports§

pub use app::error::Result;
pub use codec::FrameCodec;
pub use codec::LengthDelimitedFrameCodec;
pub use serializer::BincodeSerializer;
pub use serializer::Serializer;
pub use client::ClientCodecConfig;
pub use client::ClientError;
pub use client::SocketOptions;
pub use client::WireframeClient;
pub use connection::ConnectionActor;
pub use correlation::CorrelatableFrame;
pub use fragment::FRAGMENT_MAGIC;
pub use fragment::FragmentBatch;
pub use fragment::FragmentError;
pub use fragment::FragmentFrame;
pub use fragment::FragmentHeader;
pub use fragment::FragmentIndex;
pub use fragment::FragmentSeries;
pub use fragment::FragmentStatus;
pub use fragment::FragmentationConfig;
pub use fragment::FragmentationError;
pub use fragment::Fragmenter;
pub use fragment::MessageId;
pub use fragment::ReassembledMessage;
pub use fragment::Reassembler;
pub use fragment::ReassemblyError;
pub use fragment::decode_fragment_payload;
pub use fragment::encode_fragment_payload;
pub use fragment::fragment_overhead;
pub use hooks::ConnectionContext;
pub use hooks::ProtocolHooks;
pub use hooks::WireframeProtocol;
pub use metrics::CONNECTIONS_ACTIVE;
pub use metrics::Direction;
pub use metrics::ERRORS_TOTAL;
pub use metrics::FRAMES_PROCESSED;
pub use request::DEFAULT_BODY_CHANNEL_CAPACITY;
pub use request::RequestBodyReader;
pub use request::RequestBodyStream;
pub use request::RequestParts;
pub use request::body_channel;
pub use response::FrameStream;
pub use response::Response;
pub use response::WireframeError;
pub use session::ConnectionId;
pub use session::SessionRegistry;

Modules§

app
Application builder and supporting types.
byte_order
Helpers for explicit network byte-order conversions.
client
Client runtime for wireframe connections.
codec
Pluggable framing codecs for wire protocols.
connection
Connection actor responsible for outbound frames.
correlation
Traits for working with correlation identifiers on frames.
extractor
Extractor and request context definitions.
fragment
Fragment metadata primitives for transparent message splitting.
frame
Frame encoding utilities and length-prefix helpers built around tokio_util::codec::LengthDelimitedCodec (4-byte big-endian by default).
hooks
Internal protocol hooks invoked by the connection actor.
message
Message trait and serialization helpers.
metrics
Metric helpers for wireframe.
middleware
Request middleware building blocks.
panic
Utilities for formatting panic payloads.
preamble
Connection preamble encoding and decoding utilities.
push
Prioritized queues used for asynchronously pushing frames to a connection.
request
Request metadata and streaming body types for handler consumption.
response
Response and error types for handler outputs.
rewind_stream
Async stream adapter that replays leftover bytes.
serializer
Message serialization traits.
server
Tokio-based server for WireframeApp instances.
session
Registry of active connection push handles.