pub struct Grpc<T, const LIMIT: usize = DEFAULT_LIMIT>(pub T);Expand description
Extract and response type for unary gRPC messages.
As an extractor, decodes the gRPC length-prefixed wire format (1 byte compression flag + 4 byte big-endian length + protobuf payload) from the request body.
As a responder, encodes the protobuf message with gRPC framing and appends grpc-status: 0
trailers.
Const generic LIMIT controls the maximum request body size in bytes. Default is DEFAULT_LIMIT.
Tuple Fields§
§0: TTrait Implementations§
Source§impl<'a, 'r, C, B, T, const LIMIT: usize> FromRequest<'a, WebContext<'r, C, B>> for Grpc<T, LIMIT>
impl<'a, 'r, C, B, T, const LIMIT: usize> FromRequest<'a, WebContext<'r, C, B>> for Grpc<T, LIMIT>
Source§impl<'r, C, B, T, const LIMIT: usize> Responder<WebContext<'r, C, B>> for Grpc<T, LIMIT>
impl<'r, C, B, T, const LIMIT: usize> Responder<WebContext<'r, C, B>> for Grpc<T, LIMIT>
Auto Trait Implementations§
impl<T, const LIMIT: usize> Freeze for Grpc<T, LIMIT>where
T: Freeze,
impl<T, const LIMIT: usize> RefUnwindSafe for Grpc<T, LIMIT>where
T: RefUnwindSafe,
impl<T, const LIMIT: usize> Send for Grpc<T, LIMIT>where
T: Send,
impl<T, const LIMIT: usize> Sync for Grpc<T, LIMIT>where
T: Sync,
impl<T, const LIMIT: usize> Unpin for Grpc<T, LIMIT>where
T: Unpin,
impl<T, const LIMIT: usize> UnsafeUnpin for Grpc<T, LIMIT>where
T: UnsafeUnpin,
impl<T, const LIMIT: usize> UnwindSafe for Grpc<T, LIMIT>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