pub struct ServerResponseUnarySink<Resp: Send + 'static> { /* private fields */ }Expand description
A sink for single message (for unary request).
Implementations§
Source§impl<Resp: Send + 'static> ServerResponseUnarySink<Resp>
impl<Resp: Send + 'static> ServerResponseUnarySink<Resp>
Sourcepub fn send_metadata(&mut self, metadata: Metadata) -> Result<()>
pub fn send_metadata(&mut self, metadata: Metadata) -> Result<()>
Send response header metadata.
This operation can be only called before data sent.
Sourcepub fn finish_with_trailers(self, resp: Resp, metadata: Metadata) -> Result<()>
pub fn finish_with_trailers(self, resp: Resp, metadata: Metadata) -> Result<()>
Send the response with trailers metadata.
Sourcepub fn send_grpc_error(self, status: GrpcStatus, message: String) -> Result<()>
pub fn send_grpc_error(self, status: GrpcStatus, message: String) -> Result<()>
Send error.
Auto Trait Implementations§
impl<Resp> Freeze for ServerResponseUnarySink<Resp>
impl<Resp> !RefUnwindSafe for ServerResponseUnarySink<Resp>
impl<Resp> Send for ServerResponseUnarySink<Resp>
impl<Resp> !Sync for ServerResponseUnarySink<Resp>
impl<Resp> Unpin for ServerResponseUnarySink<Resp>
impl<Resp> !UnwindSafe for ServerResponseUnarySink<Resp>
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