pub struct Response<T> { /* private fields */ }Expand description
A gRPC response and metadata from an RPC call.
Implementations§
Source§impl<T> Response<T>
impl<T> Response<T>
Sourcepub fn metadata(&self) -> &MetadataMap
pub fn metadata(&self) -> &MetadataMap
Get a reference to the custom response metadata.
Sourcepub fn metadata_mut(&mut self) -> &mut MetadataMap
pub fn metadata_mut(&mut self) -> &mut MetadataMap
Get a mutable reference to the response metadata.
Sourcepub fn into_inner(self) -> T
pub fn into_inner(self) -> T
Consumes self, returning the message
pub fn into_http(self) -> Response<T>
pub fn map<F, U>(self, f: F) -> Response<U>where
F: FnOnce(T) -> U,
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for Response<T>where
T: Freeze,
impl<T> RefUnwindSafe for Response<T>where
T: RefUnwindSafe,
impl<T> Send for Response<T>where
T: Send,
impl<T> Sync for Response<T>where
T: Sync,
impl<T> Unpin for Response<T>where
T: Unpin,
impl<T> UnwindSafe for Response<T>where
T: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more