[][src]Struct discord_game_sdk::LobbyTransaction

pub struct LobbyTransaction { /* fields omitted */ }

Lobby Transaction

Struct in official docs

Implementations

impl LobbyTransaction[src]

pub fn new() -> Self[src]

Gets a Lobby transaction used for creating or updating a new lobby.

GetLobbyCreateTransaction in official docs
GetLobbyUpdateTransaction in official docs

pub fn kind(&mut self, kind: LobbyKind) -> &mut Self[src]

Marks the lobby as private or public

Method in official docs

pub fn owner(&mut self, user_id: UserID) -> &mut Self[src]

Sets the ID of the user owning the lobby

Method in official docs

pub fn capacity(&mut self, capacity: u32) -> &mut Self[src]

Sets the maximum amount of players that can join

Method in official docs

pub fn add_metadata(&mut self, key: String, value: String) -> &mut Self[src]

Set metadata value under a given key for the lobby

Performance

A nul byte will be appended to key and value if one is not present.

Method in official docs

pub fn delete_metadata<S>(&mut self, key: String) -> &mut Self[src]

Deletes metadata value under a given key for the lobby

Performance

A nul byte will be appended to key if one is not present.

Method in official docs

pub fn locked(&mut self, locked: bool) -> &mut Self[src]

Sets whether the lobby is locked or not. When locked, new users cannot join

Method in official docs

Trait Implementations

impl Clone for LobbyTransaction[src]

impl Debug for LobbyTransaction[src]

impl Default for LobbyTransaction[src]

Auto Trait Implementations

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> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.