Struct svc_agent::AgentId [−][src]
pub struct AgentId { /* fields omitted */ }
Expand description
Agent identifier.
It consists of a string label
and AccountId and must be unique.
Multiple agents may use the same AccountId, e.g. multiple instances
of the same service or multiple devices or browser tabs of an end user, but the label
must be different across them. An agent identifier has to be unique, otherwise it gets
disconnected by the broker. You can safely use the same label
if
AccountId is different.
Implementations
Builds an AgentId.
Arguments
-
label
– a unique string to identify the particular agent. For example the name of a service instance or a user device. -
account_id
– the account identifier of an agent.
Example
let agent_id1 = AgentId::new("instance01", AccountId::new("service_name", "svc.example.org"));
let agent_id2 = AgentId::new("web", AccountId::new("user_name", "usr.example.org"));
Trait Implementations
Returns the AgentId reference of the addressable object.
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations
impl RefUnwindSafe for AgentId
impl UnwindSafe for AgentId
Blanket Implementations
Mutably borrows from an owned value. Read more