diff --git a/src/dispatch/builder.rs b/src/dispatch/builder.rs index 1bb948f..186333c 100644 --- a/src/dispatch/builder.rs +++ b/src/dispatch/builder.rs @@ -180,6 +180,12 @@ impl<'a, 'b> DispatcherBuilder<'a, 'b> { self.stages_builder.insert(dependencies, id, system); } + /// Returns `true` if a system with the given name has been added to the `BispatcherBuilder`, + /// otherwise, returns false. + pub fn contains(&self, name: &str) -> bool { + self.map.contains_key(name) + } + /// The `Batch` is a `System` which contains a `Dispatcher`. /// By wrapping a `Dispatcher` inside a system, we can control the execution /// of a whole group of system, without sacrificing parallelism or