chore: Point to Request::set_timeout in Endpoint::timeout docs (#817)

This commit is contained in:
Thomas de Zeeuw
2021-10-28 16:24:07 +02:00
committed by GitHub
parent a6c77d1f77
commit 7ea854b695
+8
View File
@@ -113,6 +113,14 @@ impl Endpoint {
/// # let mut builder = Endpoint::from_static("https://example.com");
/// builder.timeout(Duration::from_secs(5));
/// ```
///
/// # Notes
///
/// This does **not** set the timeout metadata (`grpc-timeout` header) on
/// the request, meaning the server will not be informed of this timeout,
/// for that use [`Request::set_timeout`].
///
/// [`Request::set_timeout`]: crate::Request::set_timeout
pub fn timeout(self, dur: Duration) -> Self {
Endpoint {
timeout: Some(dur),