Skip to main content

Crate grpc

Crate grpc 

Source
Expand description

Synchronous gRPC channels, service dispatch and caller-thread streaming.

Sessions own HTTP/2 protocol state; transports supply blocking readiness and codecs encode individual messages. No executor or background thread is created.

Re-exports§

pub use channel::CallOptions;
pub use channel::ChannelConfig;
pub use channel::ChannelStreamDriver;
pub use channel::SyncChannel;
pub use server::ServerStreamDriver;
pub use server::ServiceHandler;
pub use server::SyncServer;
pub use stream::BidiStreamingCall;
pub use stream::ClientStreamingCall;
pub use stream::RequestStream;
pub use stream::ResponseSink;
pub use stream::ServerStreamingCall;
pub use stream::StreamDriver;
pub use stream::StreamError;
pub use stream::server_streams;
pub use grpc_core as core;
pub use grpc_macros as macros;

Modules§

channel
Caller-thread client channels with shared HTTP/2 sessions and typed RPC streams.
server
Caller-thread HTTP/2 service routing and typed request/response streams.
stream
Synchronous streaming calls over a caller-thread I/O driver. Drivers handle transport, framing and codecs; handles enforce RPC lifecycle and cardinality without creating threads or an executor.

Structs§

Metadata
Application metadata preserving repeated keys and insertion order.
MethodDescriptor
Static routing information emitted by service definitions.
ProstCodec
Encodes E and decodes D as individual Protobuf payloads.
Request
An outbound or decoded request with application metadata.
Response
A response message with initial application metadata.
SessionConfig
HTTP/2 settings and application-owned stream limits.
Status
A gRPC outcome containing a canonical code and a UTF-8 diagnostic message.

Enums§

CompressionAlgorithm
A supported value of the grpc-encoding header.
RpcCardinality
Message multiplicity in each direction of an RPC.

Traits§

Codec
Encodes and decodes message payloads independently of gRPC wire framing.

Type Aliases§

Timeout
Relative request deadline represented by the grpc-timeout header.