pub struct Request<T> {
pub message: T,
pub metadata: Metadata,
}Fields§
§message: T§metadata: MetadataImplementations§
Source§impl<T> Request<T>
impl<T> Request<T>
pub fn new(message: T) -> Request<T>
pub fn into_inner(self) -> T
pub fn into_parts(self) -> (Metadata, T)
pub fn from_parts(metadata: Metadata, message: T) -> Self
pub fn from_http(req: Request<T>) -> Self
pub fn into_http(self) -> Request<T>
pub fn map<F, U>(self, f: F) -> Request<U>where
F: FnOnce(T) -> U,
Auto Trait Implementations§
impl<T> Freeze for Request<T>where
T: Freeze,
impl<T> RefUnwindSafe for Request<T>where
T: RefUnwindSafe,
impl<T> Send for Request<T>where
T: Send,
impl<T> Sync for Request<T>where
T: Sync,
impl<T> Unpin for Request<T>where
T: Unpin,
impl<T> UnwindSafe for Request<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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request