pub struct RequestBuilder<TReq>where
TReq: PayloadSerialize,{ /* private fields */ }
Expand description
Builder for Request
.
Implementations§
Source§impl<TReq> RequestBuilder<TReq>where
TReq: PayloadSerialize + Clone,
impl<TReq> RequestBuilder<TReq>where
TReq: PayloadSerialize + Clone,
Sourcepub fn custom_user_data<VALUE: Into<Vec<(String, String)>>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn custom_user_data<VALUE: Into<Vec<(String, String)>>>( &mut self, value: VALUE, ) -> &mut Self
User data that will be set as custom MQTT User Properties on the Request message. Can be used to pass additional metadata to the executor. Default is an empty vector.
Source§impl<TReq: PayloadSerialize> RequestBuilder<TReq>
impl<TReq: PayloadSerialize> RequestBuilder<TReq>
Sourcepub fn payload(&mut self, payload: TReq) -> Result<&mut Self, AIOProtocolError>
pub fn payload(&mut self, payload: TReq) -> Result<&mut Self, AIOProtocolError>
Add a payload to the command request. Validates successful serialization of the payload.
§Errors
AIOProtocolError
of kind PayloadInvalid
if serialization of the payload fails
AIOProtocolError
of kind ConfigurationInvalid
if the content type is not valid utf-8
Trait Implementations§
Source§impl<TReq> Clone for RequestBuilder<TReq>where
TReq: PayloadSerialize + Clone,
impl<TReq> Clone for RequestBuilder<TReq>where
TReq: PayloadSerialize + Clone,
Source§fn clone(&self) -> RequestBuilder<TReq>
fn clone(&self) -> RequestBuilder<TReq>
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<TReq> Default for RequestBuilder<TReq>where
TReq: PayloadSerialize + Clone,
impl<TReq> Default for RequestBuilder<TReq>where
TReq: PayloadSerialize + Clone,
Auto Trait Implementations§
impl<TReq> Freeze for RequestBuilder<TReq>
impl<TReq> RefUnwindSafe for RequestBuilder<TReq>where
TReq: RefUnwindSafe,
impl<TReq> Send for RequestBuilder<TReq>where
TReq: Send,
impl<TReq> Sync for RequestBuilder<TReq>where
TReq: Sync,
impl<TReq> Unpin for RequestBuilder<TReq>where
TReq: Unpin,
impl<TReq> UnwindSafe for RequestBuilder<TReq>where
TReq: 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