azure_speech/auth.rs
1#[derive(Clone, Debug)]
2/// Auth struct, used to authenticate with Azure Speech Services.
3pub struct Auth {
4 pub(crate) region: String,
5 pub(crate) subscription: String,
6}
7impl Auth {
8 /// Create a new Auth instance from a subscription key and a region.
9 pub fn from_subscription(region: impl Into<String>, subscription: impl Into<String>) -> Self {
10 Auth {
11 region: region.into(),
12 subscription: subscription.into(),
13 }
14 }
15}