rolldown_common/hmr/client_hmr_input.rs
1use rustc_hash::FxHashSet;
2
3#[derive(Debug)]
4pub struct ClientHmrInput<'a> {
5 pub client_id: &'a str,
6 pub executed_modules: &'a FxHashSet<String>,
7}
8
9impl ClientHmrInput<'_> {
10 /// Check if a module is executed for this client.
11 /// For the special testing client ID "rolldown-tests", all modules are considered executed.
12 pub fn is_module_executed(&self, module_id: &str) -> bool {
13 self.client_id == "rolldown-tests" || self.executed_modules.contains(module_id)
14 }
15}