pub fn from_subscription<S>(subscription: S, region: S) -> Result<SpeechConfig>
    where
        S: Into<Vec<u8>>,
    {
        let c_sub = CString::new(subscription)?;
        let c_region = CString::new(region)?;

        unsafe {
            let mut handle: SPXSPEECHCONFIGHANDLE = MaybeUninit::uninit().assume_init();
            let ret =
                speech_config_from_subscription(&mut handle, c_sub.as_ptr(), c_region.as_ptr());
            convert_err(ret, "SpeechConfig::from_subscription error")?;
            SpeechConfig::from_handle(handle)
        }
    }
/// Creates an instance of the speech config with specified subscription key and region.
Creates an instance of the speech config with specified subscription key and region.
Creates an instance of the speech config with specified subscription key and region .
pub fn from_subscription<S>(subscription: S, region: S) -> Result<SpeechConfig>
    where
        S: Into<Vec<u8>>,
    {
        let c_sub = CString::new(subscription)?;
        let c_region = CString::new(region)?;
        unsafe {
            let mut handle: SPXSPEECHCONFIGHANDLE = MaybeUninit::uninit().assume_init();
            let ret =
                speech_config_from_subscription(&mut handle, c_sub.as_ptr(), c_region.as_ptr());
            convert_err(ret, "SpeechConfig::from_subscription error")?;
            SpeechConfig::from_handle(handle)
        }
    }
pub fn from_subscription < S > ( subscription : S , region : S ) -> Result < SpeechConfig > where S : Into < Vec < u8 > > , { let c_sub = CString :: new ( subscription ) ? ; let c_region = CString :: new ( region ) ? ; unsafe { let mut handle : SPXSPEECHCONFIGHANDLE = MaybeUninit :: uninit ( ) . assume_init ( ) ; let ret = speech_config_from_subscription ( & mut handle , c_sub . as_ptr ( ) , c_region . as_ptr ( ) ) ; convert_err ( ret , " " ) ? ; SpeechConfig :: from_handle ( handle ) } }
Creates an instance of the speech config with specified subscription key and region.
Creates an instance of the speech config with specified subscription key and region .
subscription
S
region
S
subscription
S
region
S