Struct fluvio_smartmodule::dataplane::core::api::RequestMessage
source · pub struct RequestMessage<R> {
pub header: RequestHeader,
pub request: R,
}Expand description
Start of API request
Fields§
§header: RequestHeader§request: RImplementations§
source§impl<R> RequestMessage<R>
impl<R> RequestMessage<R>
pub fn get_mut_header(&mut self) -> &mut RequestHeader
source§impl<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§
source§impl<R> Clone for RequestMessage<R>where
R: Clone,
impl<R> Clone for RequestMessage<R>where R: Clone,
source§fn clone(&self) -> RequestMessage<R>
fn clone(&self) -> RequestMessage<R>
Returns a copy 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<R> Debug for RequestMessage<R>where
R: Debug,
impl<R> Debug for RequestMessage<R>where R: Debug,
source§impl<R> Decoder for RequestMessage<R>where
R: Request,
impl<R> Decoder for RequestMessage<R>where R: Request,
source§impl<R> Default for RequestMessage<R>where
R: Request + Default,
impl<R> Default for RequestMessage<R>where R: Request + Default,
source§fn default() -> RequestMessage<R>
fn default() -> RequestMessage<R>
Returns the “default value” for a type. Read more