pub struct OAuthClient { /* private fields */ }Expand description
Schwab OAuth 2.0 authorization-code client.
Implementations§
Source§impl OAuthClient
impl OAuthClient
pub fn new(config: ClientConfig) -> Self
pub fn store(&self) -> &TokenStore
pub async fn exchange_code(&self, code: &str) -> Result<Tokens>
pub async fn refresh(&self) -> Result<Tokens>
pub async fn ensure_access_token(&self) -> Result<String>
pub async fn status(&self) -> Result<Option<Tokens>>
pub async fn logout(&self) -> Result<()>
Trait Implementations§
Source§impl Clone for OAuthClient
impl Clone for OAuthClient
Source§fn clone(&self) -> OAuthClient
fn clone(&self) -> OAuthClient
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 moreAuto Trait Implementations§
impl !RefUnwindSafe for OAuthClient
impl !UnwindSafe for OAuthClient
impl Freeze for OAuthClient
impl Send for OAuthClient
impl Sync for OAuthClient
impl Unpin for OAuthClient
impl UnsafeUnpin for OAuthClient
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