diff --git a/src/topic.rs b/src/topic.rs index 41706d3..6c90734 100644 --- a/src/topic.rs +++ b/src/topic.rs @@ -109,6 +109,11 @@ impl Topic { &mut self.name } + /// Creates a child topic + pub fn child(&self, name: &str) -> Self{ + Self::new(self.name.clone() + name, self.handle.clone()) + } + /// Publishes to this topic with the data type `T`. /// /// For a generic-free version, see [`generic_publish`][`Self::generic_publish`].