[][src]Struct svc_agent::SharedGroup

pub struct SharedGroup { /* fields omitted */ }

A group of agents which shares a subscription. Commonly used for balancing requests over a group of instances of some service.

Methods

impl SharedGroup[src]

pub fn new(label: &str, account_id: AccountId) -> Self[src]

Builds a SharedGroup.

Arguments

  • label – shared group label to distinct it from the others if there are any.
  • account_id – service account id. All the group's participant agents must have the same.

Example

let_account_id = AccountId::new("service_name", "svc.example.org");
let shared_group = SharedGroup::new("loadbalancer", account_id);

Trait Implementations

impl Clone for SharedGroup[src]

impl Debug for SharedGroup[src]

impl<'de> Deserialize<'de> for SharedGroup[src]

impl Display for SharedGroup[src]

fn fmt(&self, f: &mut Formatter) -> Result[src]

Formats SharedGroup as LABEL.ACCOUNT_ID.

Example

let_account_id = AccountId::new("service_name", "svc.example.org");
let shared_group = SharedGroup::new("loadbalancer", account_id);
format!("{}", shared_group); // => "loadbalancer.service_name.svc.example.org"

impl Eq for SharedGroup[src]

impl FromStr for SharedGroup[src]

type Err = Error

The associated error which can be returned from parsing.

fn from_str(val: &str) -> Result<Self, Self::Err>[src]

Parses SharedGroup from LABEL.ACCOUNT_ID format.

Example

let shared_group = SharedGroup::from_str("loadbalancer.service_name.svc.example.org"));

impl Hash for SharedGroup[src]

impl PartialEq<SharedGroup> for SharedGroup[src]

impl Serialize for SharedGroup[src]

impl StructuralEq for SharedGroup[src]

impl StructuralPartialEq for SharedGroup[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,