API Map
This chapter lists important public APIs by module. pub(crate) runtime details are not listed as user APIs.
crate root
pipeline(): creates a TCP stream typed pipeline builder.datagram_pipeline(): creates a UDP datagram typed pipeline builder.TcpServer/TcpClient: TCP server/client builders.UdpServer/UdpClient: UDP server/client builders.Channel/DatagramChannel: cloneable external write/flush/close handles.Context/DatagramContext: final handler context for writing and connection/socket operations.InboundContext/BusinessContext/OutboundContext: read-only identity contexts for transform stages. With thetlsfeature, TCP stream contexts can expose negotiated TLS metadata withtls().Life/NoLife/CloseReason: lifecycle hook API.Error/Result: framework error type and result alias.Flow: continue or stop a stage’s current message.handler: attribute macro re-exported with themacrosfeature.TlsContextBuilder/ServerTlsContext/ClientTlsContext/TlsInfo: TLS context and metadata APIs behind thetlsfeature.
traits
Flow<T>:Next(T)continues the pipeline;Stopconsumes the message.Inbound<I>: inbound transform stage returningFlow<Out>.Business<I>: business transform stage between inbound and the final handler.Handler<I>: TCP final inbound handler withtype Write.DatagramHandler<I>: UDP final inbound handler withtype Write.Outbound<I>: outbound transform stage that converts handler writes into codec-encodable values.
codec
Decoder: TCP byte stream decoder returningOption<Item>.Encoder<I>: TCP byte stream encoder.DatagramDecoder: UDP datagram decoder.DatagramEncoder<I>: UDP datagram encoder.LineCodec: UTF-8 newline-delimited stream codec.ByteArrayDecoder: drains the current stream buffer intoBytes, and can encodeBytes.ByteArrayEncoder: pass-throughBytesencoder.FixedLengthFrameDecoder: fixed-size binary frame codec.DelimiterBasedFrameDecoder: delimiter-terminated binary frame codec.LengthFieldBasedFrameDecoder: length-field frame decoder that can also encode zero-offset/zero-adjustmentBytes.LengthFieldPrepender:Bytesencoder that prepends a length field.ByteOrder: endian setting used by length-field codecs.Utf8DatagramCodec: UTF-8 datagram codec.BytesDatagramCodec: raw bytes datagram codec.JsonDecode<T>: inbound JSON stage behind thejsonfeature.JsonEncode<T>: outbound JSON stage behind thejsonfeature.HttpCodec: minimal HTTP/1.1 request/response server codec.HttpRequest: HTTP request view with method/target/version/header/body/trailer accessors.HttpResponse: HTTP response builder with status/reason/header/body.MqttCodec: MQTT 5 packet stream codec.MqttPacket: MQTT control packet enum.QoS: MQTT QoS enum.ConnectPacket/ConnAckPacket/PublishPacket/AckPacket: common MQTT packet structs.SubscribePacket/SubAckPacket/UnsubscribePacket/UnsubAckPacket: MQTT subscribe/unsubscribe packet structs.DisconnectPacket/AuthPacket/Will/MqttProperty: MQTT helper packet/property types.WebSocketCodec: server-side WebSocket codec behind thewebsocketfeature.HttpWsCodec: HTTP + WebSocket shared-port codec behind thewebsocketfeature.WebSocketInbound/WebSocketOutbound/WebSocketMessage: WebSocket message enums.HttpWsInbound/HttpWsOutbound: message enums for the shared HTTP/WebSocket codec.WebSocketHandshake/WebSocketHandshakeResponse/WebSocketClose: WebSocket handshake and close types.HttpService/WebSocketService: static service traits used byHttpWsRouter.HttpWsRouter<H, W>: combines an HTTP service and WebSocket service into oneHandler<HttpWsInbound>.
context
ConnInfo: TCP connection id, peer address, local address, and negotiated TLS metadata when thetlsfeature is enabled.DatagramInfo: UDP socket id, current peer address, local address, and optional TCP-derived TLS metadata for stream transformation contexts when thetlsfeature is enabled.ConnectionStats: TCP connection counter snapshot handle.Context<W>: TCP handler context withwrite,flush,write_and_flush,close,channel,stats, andtlswhen thetlsfeature is enabled.DatagramContext<W>: UDP handler context with current-peer and explicit-peer write/flush/close operations.InboundContext: identity context for inbound stages, includingtlsfor TLS TCP connections.BusinessContext: identity context for business stages, includingtlsfor TLS TCP connections.OutboundContext: identity context for outbound stages, includingtlsfor TLS TCP connections.
channel
Channel<W>: TCP external handle with identity, queue capacity, stats, write/flush/write_and_flush/close.DatagramChannel<W>: UDP external handle with socket identity, queue capacity, write_to/flush/write_to_and_flush/close.
life
CloseReason: TCP connection close reason.NoLife: default no-op lifecycle hooks.Life: lifecycle hook trait for servers, connections, and UDP sockets.
tls
TlsContextBuilder::for_server(): starts a server TLS context builder.TlsContextBuilder::for_client(): starts a typestate client TLS context builder inNoTruststate.ServerTlsContextBuilder: accepts certificate chain, private key, required or optional client-auth roots, ALPN protocols, and SNI-specific identities, then buildsServerTlsContext.ClientTlsContextBuilder<NoTrust>: accepts server-name overrides and trust strategy methods, but has nobuild.ClientTlsContextBuilder<HasTrust>: buildsClientTlsContextafter roots or a verifier have been selected, can attach an mTLS client identity withclient_identity_pem/client_identity_der, and can advertise ALPN protocols.TlsInfo: negotiated TLS metadata available from TCPContext::tls, stream stage contexts, andConnInfo::tls. It exposes peer certificates, selected ALPN, and the client/server name used by the connection.client_auth_required_pem/client_auth_required_der: require client certificates signed by trusted roots.client_auth_optional_pem/client_auth_optional_der: allow clients without certificates, but verify a certificate when one is presented.alpn_protocols: configures advertised ALPN protocols on client or server contexts. Protocol names must be non-empty and at most 255 bytes.sni_certificate_pem/sni_certificate_der: add SNI-specific server certificate identities. A default certificate can be configured as fallback withcertificate_chain_*plusprivate_key_*.native_roots,webpki_roots, anddanger_accept_invalid_certsare gated bytls-native-roots,tls-webpki-roots, andtls-dangerous.
pipeline::stream
builder::pipeline(): TCP builder entry point.builder::PipelineBuilder<...>: TCP builder carrying stage state and message types.builder::IntoStreamPipeline: converts a ready builder into a runtime stream pipeline.builder::IntoPipeline: compatibility conversion trait for stream pipelines.runtime::StreamPipeline<...>: TCP runtime pipeline type, usually not named directly.runtime::Pipeline<...>: compatibility type alias forStreamPipeline.runtime::StreamRuntimePipeline: public bound required by TCP transport to run typed pipelines.runtime::RuntimePipeline: compatibility alias trait forStreamRuntimePipeline.
pipeline::datagram
builder::datagram_pipeline(): UDP builder entry point.builder::DatagramPipelineBuilder<...>: UDP builder carrying stage state and message types.builder::IntoDatagramPipeline: converts a ready builder into a runtime datagram pipeline.runtime::DatagramPipeline<...>: UDP runtime pipeline type, usually not named directly.runtime::DatagramRuntimePipeline: public bound required by UDP transport to run typed pipelines.
pipeline::core
Identity: empty stage pipe that forwards values unchanged.Then<A, B>: statically composes two stage pipes.PipeStep<T, F>: ready/future stage step used by runtime optimizations.InboundPipe<I>/BusinessPipe<I>/OutboundPipe<I>: internal stage-chain processing traits exposed because they appear in builder/runtime bounds.Start/InboundPhase/BusinessPhase/Ready: builder state markers.
transport::tcp
TcpConnectionConfig: TCP connection configuration.TcpServerConfig/ServerConfig: type aliases forTcpConnectionConfig.TcpClientConfig: type alias forTcpConnectionConfig.TcpServer<F, L>: TCP server builder.TcpServer::tls: enables server-side TLS when thetlsfeature is enabled.TcpServerHandle: server shutdown/wait handle.TcpClient<F, L>: TCP client builder.TcpClient::tls: enables client-side TLS when thetlsfeature is enabled.TcpClientHandle<W>: active TCP client handle.PipelineFactory<F>: wrapper for reusable client pipeline factories.PipelineInstance<B>: wrapper for single-use client pipelines.
transport::udp
UdpSocketConfig: UDP socket configuration.UdpServerConfig/UdpClientConfig: type aliases forUdpSocketConfig.UdpServer<F, L>: UDP server socket builder.UdpServerHandle: UDP server shutdown/wait handle.UdpClient<F, L>: UDP client socket builder.UdpClientHandle<W>: active UDP client handle.
client And server
client::TcpClient/client::TcpClientHandle/client::TcpClientConfig: TCP re-exports under the client module.client::UdpClient/client::UdpClientHandle/client::UdpClientConfig: UDP re-exports under the client module.server::TcpServer/server::TcpServerHandle/server::TcpServerConfig/server::ServerConfig: TCP re-exports under the server module.server::UdpServer/server::UdpServerHandle/server::UdpServerConfig: UDP re-exports under the server module.