Crate wrpc_transport
source ·Expand description
wRPC transport abstractions, codec and framing
wRPC is an RPC framework based on WIT. It follows client-server model, where peers (servers) may serve function and method calls invoked by the other peers (clients).
The two main abstractions on top of which wRPC is built are:
- Invoke - the client-side handle to a wRPC transport, allowing clients to invoke WIT functions over wRPC transport
- Serve - the server-side handle to a wRPC transport, allowing servers to serve WIT functions over wRPC transport
Implementations of Invoke and Serve define transport-specific, multiplexed bidirectional byte stream types:
Invoke::Incoming
andServe::Incoming
represent the stream incoming from a peer.Invoke::Outgoing
andServe::Outgoing
represent the stream outgoing to a peer.
Re-exports§
pub use frame::Accept;
pub use frame::Decoder as FrameDecoder;
pub use frame::Encoder as FrameEncoder;
pub use frame::Frame;
pub use frame::FrameRef;
pub use frame::Server;
pub use invoke::Invoke;
pub use invoke::InvokeExt;
pub use serve::Serve;
pub use serve::ServeExt;
Modules§
- wRPC transport stream framing
- wRPC transport client handle
- wRPC transport server handle
Structs§
- Decoder for
future<T>
- Encoder for
future<T>
- Buffered incoming stream used for decoding values
- Decoder for
list<T>
- Decoder for
list<u8>
- Encoder for
list<T>
- Borrowed resource handle, represented as an opaque byte blob
- Decoder for borrowed resource types
- Encoder for
resource
types - Owned resource handle, represented as an opaque byte blob
- Decoder for owned resource types
- Decoder for
stream<T>
- Decoder for
stream<list<u8>>
- Decoder for
stream<list<u8>>
withAsyncRead
support - Encoder for
stream<T>
- Encoder for
stream<list<u8>>
- Encoder for
stream<list<u8>>
withAsyncRead
support - Codec for synchronous values
- Codec for
()
Traits§
- Defines value decoding
- Handles async processing state for codecs
- Defines value encoding
- Multiplexes streams
- This trait is used as a workaround for compiler bug https://github.com/rust-lang/rust/issues/96865
- Marker trait for Decode tuple types
- Marker trait for Encode tuple types
Type Aliases§
- Deferred operation used for async value processing