[−][src]Struct svc_agent::AgentId
Agent identifier.
It consists of a strig 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.
Methods
impl AgentId
[src]
pub fn new(label: &str, account_id: AccountId) -> Self
[src]
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"));
pub fn label(&self) -> &str
[src]
Trait Implementations
impl Addressable for AgentId
[src]
fn as_agent_id(&self) -> &Self
[src]
impl Authenticable for AgentId
[src]
fn as_account_id(&self) -> &AccountId
[src]
impl Clone for AgentId
[src]
impl Debug for AgentId
[src]
impl<'de> Deserialize<'de> for AgentId
[src]
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where
D: Deserializer<'de>,
[src]
D: Deserializer<'de>,
impl Display for AgentId
[src]
impl Eq for AgentId
[src]
impl FromStr for AgentId
[src]
type Err = Error
The associated error which can be returned from parsing.
fn from_str(val: &str) -> Result<Self, Self::Err>
[src]
impl Hash for AgentId
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl PartialEq<AgentId> for AgentId
[src]
impl Serialize for AgentId
[src]
impl StructuralEq for AgentId
[src]
impl StructuralPartialEq for AgentId
[src]
Auto Trait Implementations
impl RefUnwindSafe for AgentId
impl Send for AgentId
impl Sync for AgentId
impl Unpin for AgentId
impl UnwindSafe for AgentId
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,