Struct steam_mobile::user::SteamUser
source · pub struct SteamUser<MaFileState> { /* private fields */ }Expand description
A steam user needed for the authenticator to work.
Using a MaFile or not will dictate available methods on crate::SteamAuthenticator
A simple implementation that has everything required to work properly below.
SteamUser::new("test_username".to_string(), "password".to_string())
.parental_code("1111") // Only needed if the is a parental code, otherwise skip
.with_mafile_from_disk("assets/my.maFile")
.expect("Failed to find mafile on disk.");Implementations§
source§impl SteamUser<AbsentMaFile>
impl SteamUser<AbsentMaFile>
source§impl<T> SteamUser<T>
impl<T> SteamUser<T>
sourcepub fn username<S>(self, username: S) -> Selfwhere
S: ToString,
pub fn username<S>(self, username: S) -> Selfwhere
S: ToString,
Sets the account username, mandatory
sourcepub fn password<S>(self, password: S) -> Selfwhere
S: ToString,
pub fn password<S>(self, password: S) -> Selfwhere
S: ToString,
Sets the account password, mandatory
sourcepub fn parental_code<S>(self, parental_code: S) -> Selfwhere
S: ToString,
pub fn parental_code<S>(self, parental_code: S) -> Selfwhere
S: ToString,
Sets the parental code, if any.
source§impl SteamUser<AbsentMaFile>
impl SteamUser<AbsentMaFile>
sourcepub fn with_mafile_from_disk<P>(
self,
path: P
) -> Result<SteamUser<PresentMaFile>, AuthError>
pub fn with_mafile_from_disk<P>( self, path: P ) -> Result<SteamUser<PresentMaFile>, AuthError>
Convenience function that imports the file from disk
pub fn with_mafile(self, ma_file: MobileAuthFile) -> SteamUser<PresentMaFile>
Trait Implementations§
Auto Trait Implementations§
impl<MaFileState> RefUnwindSafe for SteamUser<MaFileState>where
MaFileState: RefUnwindSafe,
impl<MaFileState> Send for SteamUser<MaFileState>where
MaFileState: Send,
impl<MaFileState> Sync for SteamUser<MaFileState>where
MaFileState: Sync,
impl<MaFileState> Unpin for SteamUser<MaFileState>where
MaFileState: Unpin,
impl<MaFileState> UnwindSafe for SteamUser<MaFileState>where
MaFileState: UnwindSafe,
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
source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.