Struct ExecutionRequestTopic
pub struct ExecutionRequestTopic<'a> {
executions: ExecutionsTopic<'a>,
execution_id: &'a str,
payload_format: Option<PayloadFormat>,
}Expand description
Represents the MQTT topic where command execution requests are published.
Fields§
§executions: ExecutionsTopic<'a>§execution_id: &'a str§payload_format: Option<PayloadFormat>Implementations§
§impl<'a> ExecutionRequestTopic<'a>
impl<'a> ExecutionRequestTopic<'a>
pub const fn new(
prefix: &'a str,
device_type: DeviceType,
device_id: &'a str,
execution_id: &'a str,
payload_format: Option<PayloadFormat>,
) -> Self
pub const fn new( prefix: &'a str, device_type: DeviceType, device_id: &'a str, execution_id: &'a str, payload_format: Option<PayloadFormat>, ) -> Self
Creates a new execution request topic.
pub const fn execution_id(self) -> &'a str
pub const fn execution_id(self) -> &'a str
Returns the execution ID segment of the topic.
pub const fn payload_format(self) -> Option<PayloadFormat>
pub const fn payload_format(self) -> Option<PayloadFormat>
Returns the payload format segment of the topic, if any.
None indicates a generic payload format. With MQTTv5 the payload
format can be read from the payload format property.
pub const fn with_payload_format(self, format: Option<PayloadFormat>) -> Self
pub const fn with_payload_format(self, format: Option<PayloadFormat>) -> Self
Returns a copy of this topic with the given payload format.
pub fn parse(topic: &'a str) -> Result<Self>
Trait Implementations§
§impl<'a> Clone for ExecutionRequestTopic<'a>
impl<'a> Clone for ExecutionRequestTopic<'a>
§fn clone(&self) -> ExecutionRequestTopic<'a>
fn clone(&self) -> ExecutionRequestTopic<'a>
Returns a duplicate 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 more§impl<'a> Display for ExecutionRequestTopic<'a>
impl<'a> Display for ExecutionRequestTopic<'a>
§impl<'a> PartialEq for ExecutionRequestTopic<'a>
impl<'a> PartialEq for ExecutionRequestTopic<'a>
impl<'a> Copy for ExecutionRequestTopic<'a>
impl<'a> Eq for ExecutionRequestTopic<'a>
impl<'a> StructuralPartialEq for ExecutionRequestTopic<'a>
Auto Trait Implementations§
impl<'a> Freeze for ExecutionRequestTopic<'a>
impl<'a> RefUnwindSafe for ExecutionRequestTopic<'a>
impl<'a> Send for ExecutionRequestTopic<'a>
impl<'a> Sync for ExecutionRequestTopic<'a>
impl<'a> Unpin for ExecutionRequestTopic<'a>
impl<'a> UnwindSafe for ExecutionRequestTopic<'a>
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