pub struct SessionManager { /* private fields */ }Implementations§
Source§impl SessionManager
impl SessionManager
pub fn new() -> Self
pub fn new_with_api_key(api_key: String) -> Self
pub fn set_api_key(&self, api_key: String) -> Result<()>
pub fn get_api_key(&self) -> Result<Option<String>>
pub fn clear_api_key(&self) -> Result<()>
pub fn set_tokens( &self, access_token: String, refresh_token: Option<String>, ) -> Result<()>
pub fn get_tokens(&self) -> Result<Option<TokenPair>>
pub fn get_access_token(&self) -> Result<Option<String>>
pub fn get_refresh_token(&self) -> Result<Option<String>>
pub fn update_access_token(&self, access_token: String) -> Result<()>
pub fn clear_tokens(&self) -> Result<()>
pub fn clear_all(&self) -> Result<()>
Trait Implementations§
Auto Trait Implementations§
impl Forget for SessionManager
impl Freeze for SessionManager
impl Move for SessionManager
impl RefUnwindSafe for SessionManager
impl Send for SessionManager
impl Sync for SessionManager
impl Unpin for SessionManager
impl UnsafeUnpin for SessionManager
impl UnwindSafe for SessionManager
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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