We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 61bb3da commit 49744b1Copy full SHA for 49744b1
tonic/src/transport/channel/service/request_modifiers.rs
@@ -3,6 +3,15 @@ use std::task::{Context, Poll};
3
use tower_service::Service;
4
use crate::body::Body;
5
6
+/// A generic request modifier.
7
+///
8
+/// `Modifier<M, T>` wraps an inner service `T` and applies the
9
+/// modifier `M` to each outgoing `Request`.
10
11
+/// This type centralizes the boilerplate for implementing
12
+/// request middleware. A modifier is closure which receives
13
+/// the request and mutates it before forwarding to the
14
+/// inner service.
15
#[derive(Debug)]
16
pub(crate) struct Modifier<M, T> {
17
modifier_fn: M,
0 commit comments