Struct zinoma::engine::target_actors::TargetActors
source · pub struct TargetActors {
targets: HashMap<TargetId, Target>,
target_actor_output_sender: Sender<TargetActorOutputMessage>,
watch_option: WatchOption,
target_actor_handles: HashMap<TargetId, TargetActorHandleSet>,
target_actor_join_handles: Vec<JoinHandle<()>>,
}
Fields§
§targets: HashMap<TargetId, Target>
§target_actor_output_sender: Sender<TargetActorOutputMessage>
§watch_option: WatchOption
§target_actor_handles: HashMap<TargetId, TargetActorHandleSet>
§target_actor_join_handles: Vec<JoinHandle<()>>
Implementations§
source§impl TargetActors
impl TargetActors
pub fn new( targets: HashMap<TargetId, Target>, target_actor_output_sender: Sender<TargetActorOutputMessage>, watch_option: WatchOption ) -> Self
fn get_target_actor_handles<'a>( &'a mut self, target_id: &TargetId ) -> Result<&'a TargetActorHandleSet>
pub async fn send( &mut self, target_id: &TargetId, msg: ActorInputMessage ) -> Result<()>
pub async fn request_target(&mut self, target_id: &TargetId) -> Result<()>
pub async fn terminate(self)
async fn send_termination_message( target_actor_handles: &HashMap<TargetId, TargetActorHandleSet> )
Auto Trait Implementations§
impl RefUnwindSafe for TargetActors
impl Send for TargetActors
impl Sync for TargetActors
impl Unpin for TargetActors
impl UnwindSafe for TargetActors
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