trillium_grpc/server/mod.rs
1//! The server half of trillium-grpc.
2//!
3//! A generated `<Service>Server<T>` is a trillium [`Handler`](trillium::Handler):
4//! it matches the service's path prefix, validates the gRPC preflight, and
5//! hands each request to one of the [`Server`] dispatch methods, which drives
6//! the codec, framing, cancellation, and `grpc-status` trailers around your
7//! service-trait method. The streaming shapes hand your method a borrowed
8//! [`RequestStream`] or [`Channel`].
9//!
10//! You implement the generated service trait and wrap it in the generated
11//! server; the items here are the machinery that wrapper is built from.
12
13pub mod bidi;
14mod body;
15pub mod dispatch;
16mod grpc_conn;
17pub mod streaming;
18
19pub use bidi::{BidiResponder, drive_bidi_upgrade, has_bidi_upgrade};
20pub use dispatch::Server;
21pub use grpc_conn::GrpcServerConn;
22pub use streaming::{Channel, RequestStream};