pub struct Auth(/* private fields */);Implementations§
Source§impl Auth
impl Auth
Sourcepub fn raw_handle(&self) -> EOS_HAuth
pub fn raw_handle(&self) -> EOS_HAuth
Examples found in repository?
examples/platform_minimal.rs (line 31)
9fn main() -> Result<(), Box<dyn std::error::Error>> {
10 initialize(InitializeOptions {
11 product_name: "eos-rs-example".to_string(),
12 product_version: "0.1.0".to_string(),
13 })?;
14
15 let platform = Platform::create(PlatformOptions {
16 product_id: required_env("EOS_PRODUCT_ID")?,
17 sandbox_id: required_env("EOS_SANDBOX_ID")?,
18 deployment_id: required_env("EOS_DEPLOYMENT_ID")?,
19 client_id: required_env("EOS_CLIENT_ID")?,
20 client_secret: required_env("EOS_CLIENT_SECRET")?,
21 is_server: false,
22 encryption_key: None,
23 override_country_code: None,
24 override_locale_code: None,
25 })?;
26
27 // In a real application, call this from your main loop.
28 platform.tick();
29
30 // Optional: access low-level handles for APIs not yet wrapped.
31 let _auth = platform.auth().raw_handle();
32 let _connect = platform.connect().raw_handle();
33 let _lobby = platform.lobby().raw_handle();
34 let _p2p = platform.p2p().raw_handle();
35
36 drop(platform);
37 shutdown()?;
38 println!("eos-rs minimal flow completed.");
39 Ok(())
40}pub fn get_login_status(&self, local_user: EpicAccountId) -> LoginStatus
pub fn copy_user_auth_token( &self, local_user: EpicAccountId, ) -> Result<AuthToken>
pub fn copy_id_token(&self, account: EpicAccountId) -> Result<AuthIdToken>
pub fn query_id_token( &self, local_user: EpicAccountId, target_account: EpicAccountId, cb: impl FnOnce(Result<EOS_Auth_QueryIdTokenCallbackInfo>) + Send + 'static, )
pub fn logout( &self, local_user: EpicAccountId, cb: impl FnOnce(Result<EOS_Auth_LogoutCallbackInfo>) + Send + 'static, )
pub fn login_epic_exchange_code( &self, exchange_code: &str, cb: impl FnOnce(Result<EOS_Auth_LoginCallbackInfo>) + Send + 'static, ) -> Result<()>
Auto Trait Implementations§
impl Freeze for Auth
impl RefUnwindSafe for Auth
impl !Send for Auth
impl !Sync for Auth
impl Unpin for Auth
impl UnsafeUnpin for Auth
impl UnwindSafe for Auth
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