Skip to main content

guinea_core/actor/
registry.rs

1use crate::actor::shape::Shape;
2
3/// An actor as devtools read it. See [`Scope::actors`](crate::scope::Scope::actors).
4pub struct ActorSnapshot {
5    pub id: usize,
6    pub type_name: &'static str,
7    pub state: String,
8    pub shape: Shape,
9    pub owner: Owner,
10}
11
12/// Where an actor lives, for grouping it.
13#[derive(Clone, Copy, Debug, Default, PartialEq, Eq)]
14pub struct Owner {
15    /// The scope that owns it, as `Scope::key` names it.
16    pub scope: Option<usize>,
17    /// The feature that created it.
18    pub feature: Option<&'static str>,
19    /// The reducer it drives, when it was created with `driven_by`.
20    pub drives: Option<&'static str>,
21}