[][src]Trait svc_agent::mqtt::SubscriptionTopic

pub trait SubscriptionTopic {
    fn subscription_topic<A>(
        &self,
        agent_id: &A,
        me_version: &str
    ) -> Result<String, Error>
    where
        A: Addressable
; }

Required methods

fn subscription_topic<A>(
    &self,
    agent_id: &A,
    me_version: &str
) -> Result<String, Error> where
    A: Addressable

Returns a topic to subscribe to as string.

Arguments

  • agent_id – current agent's AgentId.
  • me_version – current agent's API version.

Example

let me = AgentId::new("instance01", AccountId::new("me_name", "svc.example.org"));
let agent = AgentId::new("instance01", AccountId::new("service_name", "svc.example.org"));
let subscription = Subscription::broadcast_events(&agent, "v1", "rooms/123/events");
let topic = subscription.subscription_topic(me, "v1")?;
Loading content...

Implementations on Foreign Types

impl SubscriptionTopic for &'static str[src]

Loading content...

Implementors

impl<'a> SubscriptionTopic for EventSubscription<'a>[src]

impl<'a> SubscriptionTopic for RequestSubscription<'a>[src]

impl<'a> SubscriptionTopic for ResponseSubscription<'a>[src]

Loading content...