Skip to main content

devtools/actors/
symbol_iterator.rs

1/* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this
3 * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
4
5use std::sync::Arc;
6
7use malloc_size_of_derive::MallocSizeOf;
8
9use crate::actor::{Actor, ActorRegistry, new_actor_name};
10
11#[derive(MallocSizeOf)]
12pub(crate) struct SymbolIteratorActor {
13    name: String,
14}
15
16impl SymbolIteratorActor {
17    pub fn register(registry: &ActorRegistry) -> Arc<Self> {
18        let name = new_actor_name::<Self>();
19        let actor = Self { name };
20        registry.register::<Self>(actor)
21    }
22}
23
24impl Actor for SymbolIteratorActor {
25    fn name(&self) -> &str {
26        &self.name
27    }
28}