Skip to main content

Lobby

Struct Lobby 

Source
pub struct Lobby(/* private fields */);

Implementations§

Source§

impl Lobby

Source

pub fn raw_handle(&self) -> EOS_HLobby

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}
Source

pub fn get_invite_count(&self, local_user: ProductUserId) -> u32

Source

pub fn get_invite_id_by_index( &self, local_user: ProductUserId, index: u32, ) -> Result<String>

Source

pub fn copy_lobby_details_handle( &self, lobby_id: &str, local_user: ProductUserId, ) -> Result<LobbyDetails>

Source

pub fn update_lobby_modification( &self, local_user: ProductUserId, lobby_id: &str, ) -> Result<LobbyModification>

Source

pub fn get_rtc_room_name( &self, lobby_id: &str, local_user: ProductUserId, ) -> Result<String>

Source

pub fn create_lobby( &self, local_user: ProductUserId, params: &CreateLobbyParams, cb: impl FnOnce(Result<EOS_Lobby_CreateLobbyCallbackInfo>) + Send + 'static, ) -> Result<()>

Source

pub fn join_lobby( &self, lobby_details: &LobbyDetails, local_user: ProductUserId, presence_enabled: bool, cb: impl FnOnce(Result<EOS_Lobby_JoinLobbyCallbackInfo>) + Send + 'static, )

Source

pub fn leave_lobby( &self, local_user: ProductUserId, lobby_id: &str, cb: impl FnOnce(Result<EOS_Lobby_LeaveLobbyCallbackInfo>) + Send + 'static, ) -> Result<()>

Source

pub fn destroy_lobby( &self, local_user: ProductUserId, lobby_id: &str, cb: impl FnOnce(Result<EOS_Lobby_DestroyLobbyCallbackInfo>) + Send + 'static, ) -> Result<()>

Auto Trait Implementations§

§

impl Freeze for Lobby

§

impl RefUnwindSafe for Lobby

§

impl !Send for Lobby

§

impl !Sync for Lobby

§

impl Unpin for Lobby

§

impl UnsafeUnpin for Lobby

§

impl UnwindSafe for Lobby

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.