devtools/actors/inspector/
simulator.rs1use malloc_size_of_derive::MallocSizeOf;
6
7use crate::actor::{Actor, ActorRegistry};
8
9#[derive(MallocSizeOf)]
10pub(crate) struct SimulatorActor {
11 name: String,
12}
13
14impl SimulatorActor {
15 pub fn register(registry: &ActorRegistry) -> String {
16 let name = registry.new_name::<Self>();
17 let actor = Self { name: name.clone() };
18 registry.register::<Self>(actor);
19 name
20 }
21}
22
23impl Actor for SimulatorActor {
24 fn name(&self) -> String {
25 self.name.clone()
26 }
27}