Struct svc_agent::SharedGroup [−][src]
pub struct SharedGroup { /* fields omitted */ }Expand description
A group of agents which shares a subscription. Commonly used for balancing requests over a group of instances of some service.
Implementations
impl SharedGroup[src]
impl SharedGroup[src]pub fn new(label: &str, account_id: AccountId) -> Self[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 Clone for SharedGroup[src]fn clone(&self) -> SharedGroup[src]
fn clone(&self) -> SharedGroup[src]Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
fn clone_from(&mut self, source: &Self)1.0.0[src]Performs copy-assignment from source. Read more
impl Debug for SharedGroup[src]
impl Debug for SharedGroup[src]impl<'de> Deserialize<'de> for SharedGroup[src]
impl<'de> Deserialize<'de> for SharedGroup[src]fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where
D: Deserializer<'de>, [src]
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where
D: Deserializer<'de>, [src]Deserialize this value from the given Serde deserializer. Read more
impl Display for SharedGroup[src]
impl Display for SharedGroup[src]fn fmt(&self, f: &mut Formatter<'_>) -> Result[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 FromStr for SharedGroup[src]
impl FromStr for SharedGroup[src]impl Hash for SharedGroup[src]
impl Hash for SharedGroup[src]impl PartialEq<SharedGroup> for SharedGroup[src]
impl PartialEq<SharedGroup> for SharedGroup[src]fn eq(&self, other: &SharedGroup) -> bool[src]
fn eq(&self, other: &SharedGroup) -> bool[src]This method tests for self and other values to be equal, and is used
by ==. Read more
fn ne(&self, other: &SharedGroup) -> bool[src]
fn ne(&self, other: &SharedGroup) -> bool[src]This method tests for !=.
impl Serialize for SharedGroup[src]
impl Serialize for SharedGroup[src]impl Eq for SharedGroup[src]
impl StructuralEq for SharedGroup[src]
impl StructuralPartialEq for SharedGroup[src]
Auto Trait Implementations
impl RefUnwindSafe for SharedGroup
impl Send for SharedGroup
impl Sync for SharedGroup
impl Unpin for SharedGroup
impl UnwindSafe for SharedGroup
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]pub fn borrow_mut(&mut self) -> &mut T[src]
pub fn borrow_mut(&mut self) -> &mut T[src]Mutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone, [src]
impl<T> ToOwned for T where
T: Clone, [src]type Owned = T
type Owned = TThe resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn to_owned(&self) -> T[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)[src]
pub fn clone_into(&self, target: &mut T)[src]🔬 This is a nightly-only experimental API. (toowned_clone_into)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>, [src]
T: for<'de> Deserialize<'de>,