Expand description
rapace-core: Core types and traits for the rapace RPC system.
This crate defines:
- Frame descriptors (
MsgDescHot,MsgDescCold) - Frame types (
Frame,FrameView) - Message header (
MsgHeader) - Transport traits (
Transport,DynTransport) - Encoding traits (
EncodeCtx,DecodeCtx) - Error codes and flags (
ErrorCode,FrameFlags,Encoding) - Control payloads (
ControlPayload) - Validation (
validate_descriptor,DescriptorLimits)
Modules§
- control_
method - Control method IDs.
Macros§
- try_
stream - Asynchronous fallible stream
Structs§
- Descriptor
Limits - Limits for descriptor validation.
- Frame
- Owned frame for sending or storage.
- Frame
Flags - Flags carried in each frame descriptor.
- Frame
View - Borrowed view of a frame for zero-copy receive.
- MsgDesc
Cold - Cold-path message descriptor (observability data).
- MsgDesc
Hot - Hot-path message descriptor (64 bytes, one cache line).
- MsgHeader
- Message header at the start of each payload.
- Received
Frame - A frame that was received and routed.
- RpcSession
- RpcSession owns a transport and multiplexes frames between clients and servers.
- Tunnel
Chunk - A chunk received on a tunnel channel.
Enums§
- Cancel
Reason - Reasons for cancelling a channel.
- Close
Reason - Reasons for closing a channel.
- Control
Payload - Control channel payloads (channel 0).
- Decode
Error - Decoding errors.
- Encode
Error - Encoding errors.
- Encoding
- Body encoding format.
- Error
Code - RPC error codes.
- RpcError
- High-level RPC errors.
- Transport
Error - Transport-level errors.
- Validation
Error - Descriptor validation errors.
Constants§
- INLINE_
PAYLOAD_ SIZE - Size of inline payload in bytes.
- INLINE_
PAYLOAD_ SLOT - Sentinel value indicating payload is inline (not in a slot).
- MSG_
HEADER_ SIZE - Size of MsgHeader in bytes.
- MSG_
HEADER_ VERSION - Current message header version.
- NO_
DEADLINE - Sentinel value indicating no deadline.
Traits§
- Decode
Ctx - Context for decoding frames into values.
- DynTransport
- Object-safe version of Transport for dynamic dispatch.
- Encode
Ctx - Context for encoding values into frames.
- Stream
Ext - An extension trait for
Streams that provides a variety of convenient combinator functions. - Stream
Sink - A sink for sending streaming items from server to client.
- Stream
Source - A source for receiving streaming items (used in client-streaming).
- Streamable
- Marker trait for types that can be streamed.
- Transport
- A transport moves frames between two peers.
Functions§
- parse_
error_ payload - Helper to parse an error from a response payload.
- validate_
descriptor - Validate a descriptor against the given limits.
Type Aliases§
- BoxFuture
- Boxed future type for object-safe transport.
- Boxed
Dispatcher - Type alias for a boxed async dispatch function.
- Streaming
- Type alias for streaming RPC results.