Crate rapace_core

Crate rapace_core 

Source
Expand description

§rapace-core

crates.io documentation MIT/Apache-2.0 licensed

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:

at your option.

Modules§

control_method
Control method IDs.
mem
stream

Macros§

try_stream
Asynchronous fallible stream

Structs§

DescriptorLimits
Limits for descriptor validation.
Frame
Owned frame for sending, receiving, or routing.
FrameFlags
Flags carried in each frame descriptor.
MsgDescCold
Cold-path message descriptor (observability data).
MsgDescHot
Hot-path message descriptor (64 bytes, one cache line).
MsgHeader
Message header at the start of each payload.
PooledBuf
Placeholder pooled buffer type.
ReceivedFrame
A frame that was received and routed.
RpcSession
RpcSession owns a transport and multiplexes frames between clients and servers.
TunnelChunk
A chunk received on a tunnel channel.
TunnelHandle
A handle identifying a tunnel channel.
TunnelStream
A bidirectional byte stream over a tunnel channel.

Enums§

CancelReason
Reasons for cancelling a channel.
CloseReason
Reasons for closing a channel.
ControlPayload
Control channel payloads (channel 0).
DecodeError
Decoding errors.
EncodeError
Encoding errors.
Encoding
Body encoding format.
ErrorCode
RPC error codes.
Payload
Payload storage for a frame.
RpcError
High-level RPC errors.
Transport
TransportError
Transport-level errors.
ValidationError
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§

DecodeCtx
Context for decoding frames into values.
EncodeCtx
Context for encoding values into frames.
StreamExt
An extension trait for Streams that provides a variety of convenient combinator functions.
StreamSink
A sink for sending streaming items from server to client.
StreamSource
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§

BoxedDispatcher
Type alias for a boxed async dispatch function.
Streaming
Type alias for streaming RPC results.