pub struct Platform(/* private fields */);Implementations§
Source§impl Platform
impl Platform
Sourcepub fn create(opts: PlatformOptions) -> Result<Self>
pub fn create(opts: PlatformOptions) -> Result<Self>
Examples found in repository?
examples/platform_minimal.rs (lines 15-25)
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}Sourcepub fn tick(&self)
pub fn tick(&self)
Examples found in repository?
examples/platform_minimal.rs (line 28)
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 raw_handle(&self) -> EOS_HPlatform
Sourcepub fn auth(&self) -> Auth
pub fn auth(&self) -> Auth
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}Sourcepub fn connect(&self) -> Connect
pub fn connect(&self) -> Connect
Examples found in repository?
examples/platform_minimal.rs (line 32)
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 achievements(&self) -> Achievements
pub fn anticheat_client(&self) -> AntiCheatClient
pub fn anticheat_server(&self) -> AntiCheatServer
pub fn custom_invites(&self) -> CustomInvites
pub fn ecom(&self) -> Ecom
pub fn friends(&self) -> Friends
pub fn integrated_platform(&self) -> IntegratedPlatform
pub fn kws(&self) -> Kws
pub fn leaderboards(&self) -> Leaderboards
Sourcepub fn lobby(&self) -> Lobby
pub fn lobby(&self) -> Lobby
Examples found in repository?
examples/platform_minimal.rs (line 33)
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 metrics(&self) -> Metrics
pub fn mods(&self) -> Mods
Sourcepub fn p2p(&self) -> P2P
pub fn p2p(&self) -> P2P
Examples found in repository?
examples/platform_minimal.rs (line 34)
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 player_data_storage(&self) -> PlayerDataStorage
pub fn presence(&self) -> Presence
pub fn progressionsnapshot(&self) -> ProgressionSnapshot
pub fn reports(&self) -> Reports
pub fn rtc(&self) -> Rtc
pub fn rtc_admin(&self) -> RtcAdmin
pub fn sanctions(&self) -> Sanctions
pub fn sessions(&self) -> Sessions
pub fn stats(&self) -> Stats
pub fn title_storage(&self) -> TitleStorage
pub fn ui(&self) -> Ui
pub fn userinfo(&self) -> UserInfo
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Platform
impl RefUnwindSafe for Platform
impl Unpin for Platform
impl UnsafeUnpin for Platform
impl UnwindSafe for Platform
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