Struct aspeak::AuthOptionsBuilder
source · pub struct AuthOptionsBuilder<'a> { /* private fields */ }Expand description
Builder for AuthOptions
Implementations§
source§impl<'a> AuthOptionsBuilder<'a>
impl<'a> AuthOptionsBuilder<'a>
sourcepub fn new(endpoint: impl Into<Cow<'a, str>>) -> Self
pub fn new(endpoint: impl Into<Cow<'a, str>>) -> Self
Create a new builder
Arguments
endpoint- Endpoint of the service, typically a URL withwssprotocol
sourcepub fn optional_token(self, token: Option<impl Into<Cow<'a, str>>>) -> Self
pub fn optional_token(self, token: Option<impl Into<Cow<'a, str>>>) -> Self
Authentication token
sourcepub fn key(self, key: impl Into<Cow<'a, str>>) -> Self
pub fn key(self, key: impl Into<Cow<'a, str>>) -> Self
Azure Subscription Key for authentication.
sourcepub fn optional_key(self, key: Option<impl Into<Cow<'a, str>>>) -> Self
pub fn optional_key(self, key: Option<impl Into<Cow<'a, str>>>) -> Self
Azure Subscription Key for authentication.
sourcepub fn headers(
self,
headers: impl Into<Cow<'a, [(HeaderName, HeaderValue)]>>
) -> Self
pub fn headers( self, headers: impl Into<Cow<'a, [(HeaderName, HeaderValue)]>> ) -> Self
Additional request headers
sourcepub fn proxy(self, proxy: impl Into<Cow<'a, str>>) -> Self
pub fn proxy(self, proxy: impl Into<Cow<'a, str>>) -> Self
Proxy server to use. Only http and socks5 proxy are supported by now.
sourcepub fn optional_proxy(self, proxy: Option<impl Into<Cow<'a, str>>>) -> Self
pub fn optional_proxy(self, proxy: Option<impl Into<Cow<'a, str>>>) -> Self
Proxy server to use. Only http and socks5 proxy are supported by now.
sourcepub fn build(self) -> AuthOptions<'a>
pub fn build(self) -> AuthOptions<'a>
Build AuthOptions
Auto Trait Implementations§
impl<'a> RefUnwindSafe for AuthOptionsBuilder<'a>
impl<'a> Send for AuthOptionsBuilder<'a>
impl<'a> Sync for AuthOptionsBuilder<'a>
impl<'a> Unpin for AuthOptionsBuilder<'a>
impl<'a> UnwindSafe for AuthOptionsBuilder<'a>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more