pub struct Response<TResp>
where TResp: PayloadSerialize,
{ pub payload: TResp, pub content_type: Option<String>, pub format_indicator: FormatIndicator, pub custom_user_data: Vec<(String, String)>, pub timestamp: Option<HybridLogicalClock>, }
Expand description

Command Response struct. Used by the Invoker

Fields§

§payload: TResp

Payload of the command response. Must implement PayloadSerialize.

§content_type: Option<String>

Content Type of the command response.

§format_indicator: FormatIndicator

Format Indicator of the command response.

§custom_user_data: Vec<(String, String)>

Custom user data set as custom MQTT User Properties on the Response message.

§timestamp: Option<HybridLogicalClock>

Timestamp of the command response.

Trait Implementations§

Source§

impl<TResp> Debug for Response<TResp>
where TResp: PayloadSerialize + Debug,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<TResp> Freeze for Response<TResp>
where TResp: Freeze,

§

impl<TResp> RefUnwindSafe for Response<TResp>
where TResp: RefUnwindSafe,

§

impl<TResp> Send for Response<TResp>
where TResp: Send,

§

impl<TResp> Sync for Response<TResp>
where TResp: Sync,

§

impl<TResp> Unpin for Response<TResp>
where TResp: Unpin,

§

impl<TResp> UnwindSafe for Response<TResp>
where TResp: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V