[−][src]Type Definition svc_agent::mqtt::OutgoingRequest
type OutgoingRequest<T> = OutgoingMessage<T, OutgoingRequestProperties>;
Methods
impl<T> OutgoingRequest<T> where
T: Serialize,
[src]
T: Serialize,
pub fn multicast<A>(
payload: T,
properties: OutgoingRequestProperties,
to: &A
) -> Self where
A: Authenticable,
[src]
payload: T,
properties: OutgoingRequestProperties,
to: &A
) -> Self where
A: Authenticable,
Builds a multicast request to publish.
Arguments
payload
– any serializable value.properties
– properties of the outgoing request.to
– destination AccountId.
Example
let props = request.to_request( "room.enter", &Subscription::unicast_responses(), ShortTermTimingProperties::until_now(start_timestamp), ); let message = OutgoingRequest::multicast(json!({ "foo": "bar" }), props);
pub fn unicast<A>(
payload: T,
properties: OutgoingRequestProperties,
to: &A,
version: &str
) -> Self where
A: Addressable,
[src]
payload: T,
properties: OutgoingRequestProperties,
to: &A,
version: &str
) -> Self where
A: Addressable,
Builds a unicast request to publish.
Arguments
payload
– any serializable value.properties
– properties of the outgoing request.to
– destination AgentId.version
– destination agent's API version.
Example
let props = request.to_request( "room.enter", &Subscription::unicast_responses(), ShortTermTimingProperties::until_now(start_timestamp), ); let to = AgentId::new("instance01", AccountId::new("service_name", "svc.example.org")); let message = OutgoingRequest::unicast(json!({ "foo": "bar" }), props, to, "v1");
Trait Implementations
impl<T> IntoEnvelope for OutgoingRequest<T> where
T: Serialize,
[src]
T: Serialize,
fn into_envelope(self) -> Result<OutgoingEnvelope, Error>
[src]
impl<T: Serialize> Publishable for OutgoingRequest<T> where
OutgoingRequest<T>: IntoEnvelope,
[src]
OutgoingRequest<T>: IntoEnvelope,