Struct fluvio_dataplane_protocol::api::RequestMessage
source · [−]pub struct RequestMessage<R> {
pub header: RequestHeader,
pub request: R,
}
Expand description
Start of API request
Fields
header: RequestHeader
request: R
Implementations
sourceimpl<R> RequestMessage<R>
impl<R> RequestMessage<R>
pub fn get_mut_header(&mut self) -> &mut RequestHeader
sourceimpl<R> RequestMessage<R> where
R: Request,
impl<R> RequestMessage<R> where
R: Request,
sourcepub fn new(header: RequestHeader, request: R) -> RequestMessage<R>
pub fn new(header: RequestHeader, request: R) -> RequestMessage<R>
create with header, this assume header is constructed from higher request no api key check is performed since it is already done
sourcepub fn new_request(request: R) -> RequestMessage<R>
pub fn new_request(request: R) -> RequestMessage<R>
create from request, header is implicitly created from key in the request
pub fn get_header_request(self) -> (RequestHeader, R)
pub fn request(&self) -> &R
pub fn new_response(
&self,
response: <R as Request>::Response
) -> ResponseMessage<<R as Request>::Response>
pub fn response_with_header<H>(
header: H,
response: <R as Request>::Response
) -> ResponseMessage<<R as Request>::Response> where
H: Into<i32>,
pub fn decode_response<T>(
&self,
src: &mut T,
version: i16
) -> Result<ResponseMessage<<R as Request>::Response>, Error> where
T: Buf,
pub fn decode_response_from_file<H>(
&self,
file_name: H,
version: i16
) -> Result<ResponseMessage<<R as Request>::Response>, Error> where
H: AsRef<Path>,
sourcepub fn set_client_id<T>(self, client_id: T) -> RequestMessage<R> where
T: Into<String>,
pub fn set_client_id<T>(self, client_id: T) -> RequestMessage<R> where
T: Into<String>,
helper function to set client id
Trait Implementations
sourceimpl<R> Clone for RequestMessage<R> where
R: Clone,
impl<R> Clone for RequestMessage<R> where
R: Clone,
sourcefn clone(&self) -> RequestMessage<R>
fn clone(&self) -> RequestMessage<R>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl<R> Debug for RequestMessage<R> where
R: Debug,
impl<R> Debug for RequestMessage<R> where
R: Debug,
sourceimpl<R> Decoder for RequestMessage<R> where
R: Request,
impl<R> Decoder for RequestMessage<R> where
R: Request,
sourceimpl<R> Default for RequestMessage<R> where
R: Request + Default,
impl<R> Default for RequestMessage<R> where
R: Request + Default,
sourcefn default() -> RequestMessage<R>
fn default() -> RequestMessage<R>
Returns the “default value” for a type. Read more
sourceimpl<R> Display for RequestMessage<R> where
R: Display,
impl<R> Display for RequestMessage<R> where
R: Display,
sourceimpl<R> Encoder for RequestMessage<R> where
R: Request,
impl<R> Encoder for RequestMessage<R> where
R: Request,
Auto Trait Implementations
impl<R> RefUnwindSafe for RequestMessage<R> where
R: RefUnwindSafe,
impl<R> Send for RequestMessage<R> where
R: Send,
impl<R> Sync for RequestMessage<R> where
R: Sync,
impl<R> Unpin for RequestMessage<R> where
R: Unpin,
impl<R> UnwindSafe for RequestMessage<R> where
R: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more