[][src]Struct svc_agent::mqtt::OutgoingRequestProperties

pub struct OutgoingRequestProperties { /* fields omitted */ }

Properties of an outgoing request.

Methods

impl OutgoingRequestProperties[src]

pub fn new(
    method: &str,
    response_topic: &str,
    correlation_data: &str,
    short_term_timing: OutgoingShortTermTimingProperties
) -> Self
[src]

Builds OutgoingRequestProperties.

Use this function only if you're making a request from scratch.

If you make a request while handling another request consider using IncomingRequestProperties::to_request.

Arguments

  • method – request method.
  • response_topic – a topic to send the response to the request to.
  • correlation_data – any string to correlate request with the upcoming response.
  • short_term_timing – outgoing request's short term timing properties.

Example

let props = OutgoingRequestProperties::new(
    "system.vacuum",
    &Subscription::unicast_responses(),
    OutgoingShortTermTimingProperties::new(Utc::now()),
);

pub fn set_agent_id(&mut self, agent_id: AgentId) -> &mut Self[src]

pub fn set_long_term_timing(
    &mut self,
    timing: LongTermTimingProperties
) -> &mut Self
[src]

pub fn set_tracking(&mut self, tracking: TrackingProperties) -> &mut Self[src]

pub fn set_local_timestamp(
    &mut self,
    local_timestamp: DateTime<Utc>
) -> &mut Self
[src]

pub fn correlation_data(&self) -> &str[src]

Trait Implementations

impl Debug for OutgoingRequestProperties[src]

impl Serialize for OutgoingRequestProperties[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

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