pub fn create_topic(
        &mut self,
        topic_name: &str,
        topic_configuration: TopicConfiguration,
    ) -> Result<(), EventError> {
        if self.topics.contains_key(topic_name) {
            Err(EventError::TopicAlreadyExist)
        } else {
            let topic_string = topic_name.to_string();
            self.topics.insert(topic_string.clone(), Topic::new(topic_string, topic_configuration));
            Ok(())
        }
    }
/// Creates a new topic using provided `topic_name` and `topic_configuration`
Creates a new topic using provided `topic_name` and `topic_configuration`
Creates a new topic using provided ` topic_name ` and ` topic_configuration `
pub fn create_topic(
        &mut self,
        topic_name: &str,
        topic_configuration: TopicConfiguration,
    ) -> Result<(), EventError> {
        if self.topics.contains_key(topic_name) {
            Err(EventError::TopicAlreadyExist)
        } else {
            let topic_string = topic_name.to_string();
            self.topics.insert(topic_string.clone(), Topic::new(topic_string, topic_configuration));
            Ok(())
        }
    }
pub fn create_topic ( & mut self , topic_name : & str , topic_configuration : TopicConfiguration , ) -> Result < ( ) , EventError > { if self . topics . contains_key ( topic_name ) { Err ( EventError :: TopicAlreadyExist ) } else { let topic_string = topic_name . to_string ( ) ; self . topics . insert ( topic_string . clone ( ) , Topic :: new ( topic_string , topic_configuration ) ) ; Ok ( ( ) ) } }
Creates a new topic using provided `topic_name` and `topic_configuration`
Creates a new topic using provided ` topic_name ` and ` topic_configuration `
&mut self
topic_name
&str
topic_configuration
TopicConfiguration
&mut self
topic_name
&str
topic_configuration
TopicConfiguration