[][src]Struct steamworks::Matchmaking

pub struct Matchmaking<Manager> { /* fields omitted */ }

Access to the steam matchmaking interface

Methods

impl<Manager> Matchmaking<Manager>[src]

pub fn request_lobby_list<F>(&self, cb: F) where
    F: FnMut(SResult<Vec<LobbyId>>) + 'static + Send
[src]

pub fn create_lobby<F>(&self, ty: LobbyType, max_members: u32, cb: F) where
    F: FnMut(SResult<LobbyId>) + 'static + Send
[src]

Attempts to create a new matchmaking lobby

The lobby with have the visibility of the of the passed LobbyType and a limit of max_members inside it. The max_members may not be higher than 250.

Triggers

  • LobbyEnter
  • LobbyCreated

pub fn join_lobby<F>(&self, lobby: LobbyId, cb: F) where
    F: FnMut(Result<LobbyId, ()>) + 'static + Send
[src]

Tries to join the lobby with the given ID

pub fn leave_lobby(&self, lobby: LobbyId)[src]

Exits the passed lobby

pub fn lobby_owner(&self, lobby: LobbyId) -> SteamId[src]

Returns the steam id of the current owner of the passed lobby

pub fn lobby_member_count(&self, lobby: LobbyId) -> usize[src]

Returns the number of players in a lobby.

Useful if you are not currently in the lobby

pub fn lobby_members(&self, lobby: LobbyId) -> Vec<SteamId>[src]

Returns a list of members currently in the lobby

pub fn set_lobby_joinable(&self, lobby: LobbyId, joinable: bool) -> bool[src]

Sets whether or not a lobby is joinable by other players. This always defaults to enabled for a new lobby.

If joining is disabled, then no players can join, even if they are a friend or have been invited.

Lobbies with joining disabled will not be returned from a lobby search.

Returns true on success, false if the current user doesn't own the lobby.

Auto Trait Implementations

impl<Manager> RefUnwindSafe for Matchmaking<Manager> where
    Manager: RefUnwindSafe

impl<Manager> !Send for Matchmaking<Manager>

impl<Manager> !Sync for Matchmaking<Manager>

impl<Manager> Unpin for Matchmaking<Manager>

impl<Manager> UnwindSafe for Matchmaking<Manager> where
    Manager: RefUnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.