From f330a3f59dee89a103e5a2caeeeafdbdbf600c92 Mon Sep 17 00:00:00 2001 From: slinkydeveloper Date: Wed, 19 Oct 2022 10:05:21 +0200 Subject: [PATCH 1/2] Change visibility of Request#into_parts to pub Signed-off-by: slinkydeveloper --- tonic/src/request.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tonic/src/request.rs b/tonic/src/request.rs index 5827bb77b..18577b90b 100644 --- a/tonic/src/request.rs +++ b/tonic/src/request.rs @@ -140,7 +140,8 @@ impl Request { self.message } - pub(crate) fn into_parts(self) -> (MetadataMap, Extensions, T) { + /// Consumes `self` returning the parts of the request. + pub fn into_parts(self) -> (MetadataMap, Extensions, T) { (self.metadata, self.extensions, self.message) } From db19f22f55bf1dd98d6d698c2c231493873f02cb Mon Sep 17 00:00:00 2001 From: slinkydeveloper Date: Wed, 19 Oct 2022 10:06:32 +0200 Subject: [PATCH 2/2] Change visibility of Request#from_parts to pub Signed-off-by: slinkydeveloper --- tonic/src/request.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tonic/src/request.rs b/tonic/src/request.rs index 18577b90b..86cacd6f7 100644 --- a/tonic/src/request.rs +++ b/tonic/src/request.rs @@ -145,7 +145,8 @@ impl Request { (self.metadata, self.extensions, self.message) } - pub(crate) fn from_parts(metadata: MetadataMap, extensions: Extensions, message: T) -> Self { + /// Create a new gRPC request from metadata, extensions and message. + pub fn from_parts(metadata: MetadataMap, extensions: Extensions, message: T) -> Self { Self { metadata, extensions,