Skip to main content

MessageFactory

Trait MessageFactory 

Source
pub trait MessageFactory: Debug + Send {
    // Required methods
    fn get_supported_begin_strings(&self) -> Vec<String>;
    fn create(
        &self,
        begin_string: &str,
        msg_type: &str,
    ) -> Result<Message, MessageFactoryError>;
    fn create_group(
        &self,
        begin_string: &str,
        msg_type: &str,
        group_counter_tag: Tag,
    ) -> Option<Group>;
}

Required Methods§

Source

fn get_supported_begin_strings(&self) -> Vec<String>

Source

fn create( &self, begin_string: &str, msg_type: &str, ) -> Result<Message, MessageFactoryError>

Source

fn create_group( &self, begin_string: &str, msg_type: &str, group_counter_tag: Tag, ) -> Option<Group>

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§