pub struct ActorSystem { /* private fields */ }Implementations§
Source§impl ActorSystem
impl ActorSystem
pub fn new() -> Self
pub fn handler_tx(&self) -> UnboundedSender<ActorSystemCmd>
pub async fn register( &mut self, address: String, tx: UnboundedSender<Message>, restart_tx: UnboundedSender<()>, kill_tx: UnboundedSender<()>, life_cycle: LifeCycle, )
pub fn set_lifecycle(&mut self, address: &str, life_cycle: LifeCycle)
pub fn restart(&mut self, address_regex: String)
pub fn unregister(&mut self, address_regex: String)
pub async fn send<T>(&self, address: String, msg: T) -> Result<(), ActorError>where
T: Serialize + DeserializeOwned,
pub async fn send_broadcast<T>(
&self,
address_regex: String,
msg: T,
) -> Vec<Result<(), ActorError>>where
T: Serialize + DeserializeOwned,
pub async fn send_and_recv<T, R>( &self, address: String, msg: T, ) -> Result<R, ActorError>
pub async fn run_job<T, R>( &self, address: String, subscript: bool, job: JobSpec, msg: T, ) -> Result<Option<UnboundedReceiver<Result<R, Error>>>, ActorError>
Trait Implementations§
Source§impl Clone for ActorSystem
impl Clone for ActorSystem
Source§fn clone(&self) -> ActorSystem
fn clone(&self) -> ActorSystem
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ActorSystem
impl RefUnwindSafe for ActorSystem
impl Send for ActorSystem
impl Sync for ActorSystem
impl Unpin for ActorSystem
impl UnwindSafe for ActorSystem
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