Crate tent_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:

  1. errors
  2. protocol
  3. transport
  4. server
  5. 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

Traits

  • Specifies the minimum functionality an auto-generated client should provide to communicate with a Thrift server.

Functions

Type Definitions

  • Result type returned by all runtime library functions.