Expand description
§rapace-core
Core types and traits for rapace RPC framework.
This crate provides the fundamental types and protocols used by rapace:
- Transport traits: Abstraction for different transport implementations
- Frame formats: Protocol buffers for RPC messaging
- RPC session management: Core session and session pump types
- Serialization: Support for multiple serialization formats via facet
This is a low-level crate primarily used by rapace itself and transport implementations.
§License
Licensed under either of:
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
Modules§
- control_
method - Control method IDs.
- mem
- stream
Macros§
- try_
stream - Asynchronous fallible stream
Structs§
- Descriptor
Limits - Limits for descriptor validation.
- Frame
- Owned frame for sending, receiving, or routing.
- Frame
Flags - Flags carried in each frame descriptor.
- 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.
- Pooled
Buf - Placeholder pooled buffer type.
- 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.
- Tunnel
Handle - A handle identifying a tunnel channel.
- Tunnel
Stream - A bidirectional byte stream over 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.
- Payload
- Payload storage for a frame.
- RpcError
- High-level RPC errors.
- Transport
- 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.
- 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.
Functions§
- parse_
error_ payload - Helper to parse an error from a response payload.
- validate_
descriptor - Validate a descriptor against the given limits.
Type Aliases§
- Boxed
Dispatcher - Type alias for a boxed async dispatch function.
- Streaming
- Type alias for streaming RPC results.