pub struct UnitGrpcResponse { /* private fields */ }Expand description
Implementations§
Source§impl UnitGrpcResponse
impl UnitGrpcResponse
Sourcepub fn with_status_code(self, status: u32) -> Self
pub fn with_status_code(self, status: u32) -> Self
Sets the gRPC status code. Returns self for method chaining.
A status code of 0 indicates success (OK).
Sourcepub fn with_message(self, message: Vec<u8>) -> Self
pub fn with_message(self, message: Vec<u8>) -> Self
Sets the serialized protobuf response message. Returns self for method chaining.
Sourcepub fn with_status<S: Into<String>>(self, status: S) -> Self
pub fn with_status<S: Into<String>>(self, status: S) -> Self
Sets the gRPC status message. Returns self for method chaining.
Trait Implementations§
Source§impl Clone for UnitGrpcResponse
impl Clone for UnitGrpcResponse
Source§fn clone(&self) -> UnitGrpcResponse
fn clone(&self) -> UnitGrpcResponse
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Default for UnitGrpcResponse
impl Default for UnitGrpcResponse
Source§fn default() -> UnitGrpcResponse
fn default() -> UnitGrpcResponse
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for UnitGrpcResponse
impl<'de> Deserialize<'de> for UnitGrpcResponse
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl GrpcBackend for UnitGrpcResponse
impl GrpcBackend for UnitGrpcResponse
fn call(&self, _: UnitGrpcRequest) -> UnitGrpcResponse
Auto Trait Implementations§
impl Freeze for UnitGrpcResponse
impl RefUnwindSafe for UnitGrpcResponse
impl Send for UnitGrpcResponse
impl Sync for UnitGrpcResponse
impl Unpin for UnitGrpcResponse
impl UnsafeUnpin for UnitGrpcResponse
impl UnwindSafe for UnitGrpcResponse
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