Expand description
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).
§Socket address
For Linux distributions, ttrpc-rust supports three types of socket:
unix:///run/some.sock
: Normal Unix domain socket.unix://@/run/some.sock
: Abstract Unix domain socket.vsock://vsock://8:1024
: vsock.
For mscOS, ttrpc-rust only supports normal Unix domain socket:
unix:///run/some.sock
: Normal Unix domain socket.
Re-exports§
pub use sync::Client;
sync
Modules§
- asynchronous
async
- Server and client in async mode (alias r#async).
- context
- error
- Error and Result of ttrpc and relevant functions, macros.
- proto
- sync
sync
- Server and Client in sync mode.
Macros§
- async_
client_ request async
- Send request through async client.
- async_
client_ stream async
- Duplex streaming through async client.
- async_
client_ stream_ receive async
- Only receive streaming through async client.
- async_
client_ stream_ send async
- Only send streaming through async client.
- async_
client_ streamimg_ handler async
- Handle client streaming in async mode.
- async_
duplex_ streamimg_ handler async
- Handle duplex streaming in async mode.
- async_
request_ handler async
- Handle request in async mode.
- async_
server_ streamimg_ handler async
- Handle server streaming in async mode.
- client_
request sync
- Send request through sync client.
- err_
to_ others - Convert to ttrpc::Error::Others.
- request_
handler sync
- Handle request in sync mode.
Structs§
- Message
Header - Message header of ttrpc.
- Request
- Response
- Server
sync
- A ttrpc Server (sync).
- Status
- Ttrpc
Context sync
- The context of ttrpc (sync).
Enums§
Traits§
- Method
Handler sync
- 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.
Type Aliases§
- Result
- A specialized Result type for ttrpc.