Skip to main content

IntoTokenSource

Trait IntoTokenSource 

Source
pub trait IntoTokenSource {
    // Required method
    fn into_token_source(self) -> Box<dyn TokenSource>;
}
Expand description

Conversion into a boxed TokenSource, so Client::new can accept an ApiKey, a StaticToken, a Box<dyn TokenSource>, or any custom source with one signature.

Required Methods§

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl IntoTokenSource for Box<dyn TokenSource>

Implementors§

Source§

impl<T: TokenSource + 'static> IntoTokenSource for T