[−][src]Trait svc_agent::mqtt::SubscriptionTopic
Required methods
fn subscription_topic<A>(
&self,
agent_id: &A,
me_version: &str
) -> Result<String, Error> where
A: Addressable,
&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")?;
Implementors
impl<'a> SubscriptionTopic for EventSubscription<'a>
[src]
fn subscription_topic<A>(
&self,
_me: &A,
_me_version: &str
) -> Result<String, Error> where
A: Addressable,
[src]
&self,
_me: &A,
_me_version: &str
) -> Result<String, Error> where
A: Addressable,
impl<'a> SubscriptionTopic for RequestSubscription<'a>
[src]
fn subscription_topic<A>(
&self,
me: &A,
me_version: &str
) -> Result<String, Error> where
A: Addressable,
[src]
&self,
me: &A,
me_version: &str
) -> Result<String, Error> where
A: Addressable,
impl<'a> SubscriptionTopic for ResponseSubscription<'a>
[src]
fn subscription_topic<A>(
&self,
me: &A,
me_version: &str
) -> Result<String, Error> where
A: Addressable,
[src]
&self,
me: &A,
me_version: &str
) -> Result<String, Error> where
A: Addressable,