Crate databend_thrift
source ·Expand description
Rust runtime library for the Apache Thrift RPC system.
This crate implements the components required to build a working Thrift server and client. It is divided into the following modules:
- errors
- protocol
- transport
- server
- autogen
The modules are layered as shown in the diagram below. The autogen'd
layer is generated by the Thrift compiler’s Rust plugin. It uses the
types and functions defined in this crate to serialize and deserialize
messages and implement RPC. Users interact with these types and services
by writing their own code that uses the auto-generated clients and
servers.
+-----------+
| user app |
+-----------+
| autogen'd | (uses errors, autogen)
+-----------+
| protocol |
+-----------+
| transport |
+-----------+
Tutorial
For an example of how to setup a simple client and server using this crate see the tutorial.
Modules
Types used to send and receive primitives between a Thrift client and server.
Types used to implement a Thrift server.
Types used to send and receive bytes over an I/O channel.
Structs
Information about errors in auto-generated code or in user-implemented
service handlers.
A wrapper around floats providing implementations of
Eq
, Ord
, and Hash
.Information about errors that occur in the runtime library.
Information about I/O errors.
Enums
Auto-generated or user-implemented code error categories.
Error type returned by all runtime library functions.
Runtime library error categories.
I/O error categories.
Traits
Specifies the minimum functionality an auto-generated client should provide
to communicate with a Thrift server.
Functions
Create a new
Error
instance of type Application
that wraps an
ApplicationError
.Create a new
Error
instance of type Protocol
that wraps a
ProtocolError
.Create a new
Error
instance of type Transport
that wraps a
TransportError
.Type Definitions
Result type returned by all runtime library functions.