[][src]Crate ttrpc

ttrpc-rust is a non-core subproject of containerd

ttrpc-rust is the Rust version of ttrpc. ttrpc is GRPC for low-memory environments.

Example:

Check this

Feature flags

  • async: Enables async server and client.
  • sync: Enables traditional sync server and client (default enabled).
  • protobuf-codec: Includes rust-protobuf (default enabled).

Modules

asynchronousasync

Server and client in async mode (alias r#async).

client

Sync client of ttrpc.

common

Common functions and macros.

error

Error and Result of ttrpc and relevant functions, macros.

server

Sync server of ttrpc.

syncsync

Server and Client in sync mode.

ttrpc

Generated file from ttrpc.proto

Macros

Err_to_Others

Convert to ttrpc::Error::Others.

async_client_request

Send request through async client.

async_request_handler

Handle request in async mode.

client_request

Send request through sync client.

request_handler

Handle request in sync mode.

Structs

Client

A ttrpc Client (sync).

MessageHeader

Message header of ttrpc.

Request

Generated files are compatible only with the same version of protobuf runtime.

Response
Server

A ttrpc Server (sync).

Status
TtrpcContext

The context of ttrpc (sync).

Enums

Code
Error

The error type for ttrpc.

Traits

MethodHandler

Trait that implements handler which is a proxy to the desired method (sync).

Functions

get_status

Get ttrpc::Status from ttrpc::Code and a message.

response_to_channel

Response message through a channel. Eventually the message will sent to Client.

write_message

Type Definitions

Result

A specialized Result type for ttrpc.