pub struct SFAccount { /* private fields */ }
Implementations§
source§impl SFAccount
impl SFAccount
pub async fn login( username: String, password: String ) -> Result<SFAccount, SFError>
sourcepub async fn login_with_options(
username: String,
password: String,
options: ConnectionOptions
) -> Result<SFAccount, SFError>
pub async fn login_with_options( username: String, password: String, options: ConnectionOptions ) -> Result<SFAccount, SFError>
Creates a new SSO account by logging the user in.
sourcepub async fn refresh_login(&mut self) -> Result<(), SFError>
pub async fn refresh_login(&mut self) -> Result<(), SFError>
Refreshes the session by logging in again with the stored credentials. This can be used when the server removed our session either for being connected too long, or the server was restarted/cache cleared and forgot us
sourcepub async fn characters(
self
) -> Result<Vec<Result<CharacterSession, SFError>>, SFError>
pub async fn characters( self ) -> Result<Vec<Result<CharacterSession, SFError>>, SFError>
Queries the SSO for all characters associated with this account. This consumes the Account, as the character sessions may need to referesh the accounts session, which they are only allowed to do, if they own it (in an Arc<Mutex<_>>) and there should be no need to keep the account around anyways
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for SFAccount
impl Send for SFAccount
impl Sync for SFAccount
impl Unpin for SFAccount
impl !UnwindSafe for SFAccount
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