pub fn from_subscription<S>(subscription_key: S, region: S) -> Result<Self>
    where
        S: Into<Vec<u8>>,
    {
        unsafe {
            let mut handle: SPXSPEECHCONFIGHANDLE = MaybeUninit::uninit().assume_init();
            let c_sub_key = CString::new(subscription_key)?;
            let c_region = CString::new(region)?;
            let ret = bot_framework_config_from_subscription(
                &mut handle,
                c_sub_key.as_ptr(),
                c_region.as_ptr(),
                std::ptr::null(),
            );
            convert_err(ret, "DialogServiceConnector::from_subscription error")?;
            Ok(BotFrameworkConfig {
                //handle: SmartHandle::create("DialogServiceConnector", handle, speech_config_release),
                config: SpeechConfig::from_handle(handle)?,
            })
        }
    }
/// NewBotFrameworkConfigFromSubscription creates a bot framework service config instance with the specified subscription
/// key and region.
NewBotFrameworkConfigFromSubscription creates a bot framework service config instance with the specified subscription
key and region.
NewBotFrameworkConfigFromSubscription creates a bot framework service config instance with the specified subscription key and region .
pub fn from_subscription<S>(subscription_key: S, region: S) -> Result<Self>
    where
        S: Into<Vec<u8>>,
    {
        unsafe {
            let mut handle: SPXSPEECHCONFIGHANDLE = MaybeUninit::uninit().assume_init();
            let c_sub_key = CString::new(subscription_key)?;
            let c_region = CString::new(region)?;
            let ret = bot_framework_config_from_subscription(
                &mut handle,
                c_sub_key.as_ptr(),
                c_region.as_ptr(),
                std::ptr::null(),
            );
            convert_err(ret, "DialogServiceConnector::from_subscription error")?;
            Ok(BotFrameworkConfig {
                //handle: SmartHandle::create("DialogServiceConnector", handle, speech_config_release),
                config: SpeechConfig::from_handle(handle)?,
            })
        }
    }
pub fn from_subscription < S > ( subscription_key : S , region : S ) -> Result < Self > where S : Into < Vec < u8 > > , { unsafe { let mut handle : SPXSPEECHCONFIGHANDLE = MaybeUninit :: uninit ( ) . assume_init ( ) ; let c_sub_key = CString :: new ( subscription_key ) ? ; let c_region = CString :: new ( region ) ? ; let ret = bot_framework_config_from_subscription ( & mut handle , c_sub_key . as_ptr ( ) , c_region . as_ptr ( ) , std :: ptr :: null ( ) , ) ; convert_err ( ret , " " ) ? ; Ok ( BotFrameworkConfig { //handle: SmartHandle::create("DialogServiceConnector", handle, speech_config_release), config : SpeechConfig :: from_handle ( handle ) ? , } ) } }
NewBotFrameworkConfigFromSubscription creates a bot framework service config instance with the specified subscription
key and region.
NewBotFrameworkConfigFromSubscription creates a bot framework service config instance with the specified subscription key and region .
subscription_key
S
region
S
subscription_key
S
region
S