pub struct StaticTokenProvider(/* private fields */);Expand description
TokenProvider that returns the same AuthToken for every call.
This is the default impl wrapping the token passed to
SchwabClient::new; callers who hold a
short-lived token and tear the client down when it expires need no
other provider.
Implementations§
Source§impl StaticTokenProvider
impl StaticTokenProvider
Sourcepub fn new(token: AuthToken) -> Self
pub fn new(token: AuthToken) -> Self
Wrap an AuthToken so it can be served as a TokenProvider.
Trait Implementations§
Source§impl Clone for StaticTokenProvider
impl Clone for StaticTokenProvider
Source§fn clone(&self) -> StaticTokenProvider
fn clone(&self) -> StaticTokenProvider
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for StaticTokenProvider
impl Debug for StaticTokenProvider
Source§impl TokenProvider for StaticTokenProvider
impl TokenProvider for StaticTokenProvider
Auto Trait Implementations§
impl Freeze for StaticTokenProvider
impl RefUnwindSafe for StaticTokenProvider
impl Send for StaticTokenProvider
impl Sync for StaticTokenProvider
impl Unpin for StaticTokenProvider
impl UnsafeUnpin for StaticTokenProvider
impl UnwindSafe for StaticTokenProvider
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