pub struct ProcessGroup<M>where
M: Message,{ /* private fields */ }Available on crate feature
actor only.Expand description
A group of actors that share messages using a routing Strategy.
Implementations§
Source§impl<M> ProcessGroup<M>where
M: Message,
impl<M> ProcessGroup<M>where
M: Message,
Sourcepub fn new() -> ProcessGroup<M>
pub fn new() -> ProcessGroup<M>
Creates an empty process group.
Sourcepub fn with_strategy(strategy: Strategy) -> ProcessGroup<M>
pub fn with_strategy(strategy: Strategy) -> ProcessGroup<M>
Creates an empty process group with a routing strategy.
Sourcepub fn join(&self, broker: Broker<M>) -> Membership<M>
pub fn join(&self, broker: Broker<M>) -> Membership<M>
Adds a broker until the returned membership is dropped.
Sourcepub fn send(&self, message: M) -> Result<(), DeliverError<M>>
pub fn send(&self, message: M) -> Result<(), DeliverError<M>>
Routes a message to the next available member.
Trait Implementations§
Source§impl<M> Clone for ProcessGroup<M>where
M: Message,
impl<M> Clone for ProcessGroup<M>where
M: Message,
Source§fn clone(&self) -> ProcessGroup<M>
fn clone(&self) -> ProcessGroup<M>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<M> Debug for ProcessGroup<M>where
M: Message,
impl<M> Debug for ProcessGroup<M>where
M: Message,
Source§impl<M> Default for ProcessGroup<M>where
M: Message,
impl<M> Default for ProcessGroup<M>where
M: Message,
Source§fn default() -> ProcessGroup<M>
fn default() -> ProcessGroup<M>
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl<M> Freeze for ProcessGroup<M>
impl<M> RefUnwindSafe for ProcessGroup<M>where
Arc<GroupInner<M>>: RefUnwindSafe,
impl<M> Send for ProcessGroup<M>
impl<M> Sync for ProcessGroup<M>
impl<M> Unpin for ProcessGroup<M>
impl<M> UnsafeUnpin for ProcessGroup<M>where
Arc<GroupInner<M>>: UnsafeUnpin,
impl<M> UnwindSafe for ProcessGroup<M>where
Arc<GroupInner<M>>: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more