fn validate(self) -> Result<(ScConfig, FlvCustomSpu), CliError> {

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

        // custom spu
        let custom_spu = if let Some(name) = self.name {
            FlvCustomSpu::Name(name)
        } else if let Some(id) = self.id {
            FlvCustomSpu::Id(id)
        } else {
            return Err(CliError::IoError(IoError::new(
                ErrorKind::Other,
                "missing custom SPU name or id",
            )));
        };

        // return server separately from config
        Ok((target_server, custom_spu))
    }
/// Validate cli options. Generate target-server and delete custom spu config.
Validate cli options. Generate target-server and delete custom spu config.
Validate cli options . Generate target - server and delete custom spu config .
fn validate(self) -> Result<(ScConfig, FlvCustomSpu), CliError> {
        let target_server = ScConfig::new(self.sc, self.profile)?;
        // custom spu
        let custom_spu = if let Some(name) = self.name {
            FlvCustomSpu::Name(name)
        } else if let Some(id) = self.id {
            FlvCustomSpu::Id(id)
        } else {
            return Err(CliError::IoError(IoError::new(
                ErrorKind::Other,
                "missing custom SPU name or id",
            )));
        };
        // return server separately from config
        Ok((target_server, custom_spu))
    }
fn validate ( self ) -> Result < ( ScConfig , FlvCustomSpu ) , CliError > { let target_server = ScConfig :: new ( self . sc , self . profile ) ? ; // custom spu let custom_spu = if let Some ( name ) = self . name { FlvCustomSpu :: Name ( name ) } else if let Some ( id ) = self . id { FlvCustomSpu :: Id ( id ) } else { return Err ( CliError :: IoError ( IoError :: new ( ErrorKind :: Other , " " , ) ) ) ; } ; // return server separately from config Ok ( ( target_server , custom_spu ) ) }
Validate cli options.
Validate cli options .
self
self