Skip to content

Commit 7ea854b

Browse files
chore: Point to Request::set_timeout in Endpoint::timeout docs (#817)
1 parent a6c77d1 commit 7ea854b

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

tonic/src/transport/channel/endpoint.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,14 @@ impl Endpoint {
113113
/// # let mut builder = Endpoint::from_static("https://example.com");
114114
/// builder.timeout(Duration::from_secs(5));
115115
/// ```
116+
///
117+
/// # Notes
118+
///
119+
/// This does **not** set the timeout metadata (`grpc-timeout` header) on
120+
/// the request, meaning the server will not be informed of this timeout,
121+
/// for that use [`Request::set_timeout`].
122+
///
123+
/// [`Request::set_timeout`]: crate::Request::set_timeout
116124
pub fn timeout(self, dur: Duration) -> Self {
117125
Endpoint {
118126
timeout: Some(dur),

0 commit comments

Comments
 (0)