pub struct CustomCommandsConfig {
pub config: SpeechConfig,
}
Expand description
CustomCommandsConfig defines configurations for the dialog service connector object for using a CustomCommands backend.
Fields
config: SpeechConfig
Implementations
sourceimpl CustomCommandsConfig
impl CustomCommandsConfig
sourcepub fn from_subscription<S>(
application_id: S,
subscription_key: S,
region: S
) -> Result<CustomCommandsConfig> where
S: Into<Vec<u8>>,
pub fn from_subscription<S>(
application_id: S,
subscription_key: S,
region: S
) -> Result<CustomCommandsConfig> where
S: Into<Vec<u8>>,
Creates a Custom Commands config instance with the specified application id, subscription key and region.
sourcepub fn from_auth_token<S>(
application_id: S,
authorization_token: S,
region: S
) -> Result<CustomCommandsConfig> where
S: Into<Vec<u8>>,
pub fn from_auth_token<S>(
application_id: S,
authorization_token: S,
region: S
) -> Result<CustomCommandsConfig> where
S: Into<Vec<u8>>,
Creates a Custom Commands config instance with the specified application id authorization token and region. Note: The caller needs to ensure that the authorization token is valid. Before the authorization token expires, the caller needs to refresh it by calling this setter with a new valid token. As configuration values are copied when creating a new connector, the new token value will not apply to connectors that have already been created. For connectors that have been created before, you need to set authorization token of the corresponding connector to refresh the token. Otherwise, the connectors will encounter errors during operation.
sourcepub fn get_application_id(&self) -> Result<String>
pub fn get_application_id(&self) -> Result<String>
Gets the corresponding backend application identifier.
sourcepub fn set_application_id(&mut self, app_id: String) -> Result<()>
pub fn set_application_id(&mut self, app_id: String) -> Result<()>
Sets the corresponding backend application identifier.
Trait Implementations
sourceimpl Debug for CustomCommandsConfig
impl Debug for CustomCommandsConfig
sourceimpl DialogServiceConfig for CustomCommandsConfig
impl DialogServiceConfig for CustomCommandsConfig
fn get_speech_config(&mut self) -> &mut SpeechConfig
fn get_handle(&self) -> SPXSPEECHCONFIGHANDLE
fn set_property(&mut self, id: PropertyId, value: String) -> Result<()>
fn get_property(&mut self, id: PropertyId) -> Result<String>
fn set_property_by_string(&mut self, name: String, value: String) -> Result<()>
fn get_property_by_string(&mut self, name: String) -> Result<String>
fn set_service_property(
&mut self,
name: String,
value: String,
channel: ServicePropertyChannel
) -> Result<()>
fn set_proxy(&mut self, hostname: String, port: u64) -> Result<()>
fn set_proxy_with_usrname_and_pwd(
&mut self,
hostname: String,
port: u64,
username: String,
password: String
) -> Result<()>
sourcefn set_language(&mut self, lang: String) -> Result<()>
fn set_language(&mut self, lang: String) -> Result<()>
SetLanguage sets the input language to the connector. The language is specified in BCP-47 format. Read more
fn get_language(&mut self) -> Result<String>
Auto Trait Implementations
impl RefUnwindSafe for CustomCommandsConfig
impl Send for CustomCommandsConfig
impl !Sync for CustomCommandsConfig
impl Unpin for CustomCommandsConfig
impl UnwindSafe for CustomCommandsConfig
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more