pub struct Response<T> { /* private fields */ }Expand description
A response message with initial application metadata.
This envelope does not represent terminal gRPC status or trailing metadata. Those belong to the RPC stream lifecycle.
Implementations§
Source§impl<T> Response<T>
impl<T> Response<T>
Sourcepub const fn from_parts(metadata: Metadata, message: T) -> Response<T>
pub const fn from_parts(metadata: Metadata, message: T) -> Response<T>
Combines initial application metadata and a message.
Sourcepub const fn metadata_mut(&mut self) -> &mut Metadata
pub const fn metadata_mut(&mut self) -> &mut Metadata
Mutably borrows the initial application metadata.
Sourcepub fn into_parts(self) -> (Metadata, T)
pub fn into_parts(self) -> (Metadata, T)
Consumes the envelope, returning initial metadata and the message.
Trait Implementations§
impl<T> Eq for Response<T>where
T: Eq,
impl<T> StructuralPartialEq for Response<T>where
T: PartialEq,
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> UnsafeUnpin for Response<T>where
T: UnsafeUnpin,
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