fn validate(self) -> Result<(SpuControllerConfig, CreateTopicConfig), CliError> {
        // topic specific configurations
        let replica_config = if self.partitions.is_some() {
            self.parse_computed_replica()
        } else {
            self.parse_assigned_replica()?
        };

        let create_topic_cfg = CreateTopicConfig {
            topic: self.topic,
            replica: replica_config,
            validate_only: self.validate_only,
        };

        let target_server = SpuControllerConfig::new(self.sc, self.kf, self.profile)?;

        // return server separately from config
        Ok((target_server, create_topic_cfg))
    }
/// Validate cli options. Generate target-server and create-topic configuration.
Validate cli options. Generate target-server and create-topic configuration.
Validate cli options . Generate target - server and create - topic configuration .
fn validate(self) -> Result<(SpuControllerConfig, CreateTopicConfig), CliError> {
        // topic specific configurations
        let replica_config = if self.partitions.is_some() {
            self.parse_computed_replica()
        } else {
            self.parse_assigned_replica()?
        };
        let create_topic_cfg = CreateTopicConfig {
            topic: self.topic,
            replica: replica_config,
            validate_only: self.validate_only,
        };
        let target_server = SpuControllerConfig::new(self.sc, self.kf, self.profile)?;
        // return server separately from config
        Ok((target_server, create_topic_cfg))
    }
fn validate ( self ) -> Result < ( SpuControllerConfig , CreateTopicConfig ) , CliError > { // topic specific configurations let replica_config = if self . partitions . is_some ( ) { self . parse_computed_replica ( ) } else { self . parse_assigned_replica ( ) ? } ; let create_topic_cfg = CreateTopicConfig { topic : self . topic , replica : replica_config , validate_only : self . validate_only , } ; let target_server = SpuControllerConfig :: new ( self . sc , self . kf , self . profile ) ? ; // return server separately from config Ok ( ( target_server , create_topic_cfg ) ) }
Validate cli options.
Validate cli options .
self
self