Struct rivet_matchmaker::client::ClientWrapper
source · pub struct ClientWrapper { /* private fields */ }
Expand description
A wrapper around Client
. Helps reduce external imports.
Methods from Deref<Target = Client<DynConnector, Identity>>
sourcepub fn find_lobby(&self) -> FindLobby<C, M, R>
pub fn find_lobby(&self) -> FindLobby<C, M, R>
Constructs a fluent builder for the FindLobby
operation.
- The fluent builder is configurable:
game_modes(Vec<String>)
/set_game_modes(Option<Vec<String>>)
: Game modes to match lobbies against.regions(Vec<String>)
/set_regions(Option<Vec<String>>)
: Regions to match lobbies against. If not specified, the optimal region will be determined and will attempt to find lobbies in that region.prevent_auto_create_lobby(bool)
/set_prevent_auto_create_lobby(Option<bool>)
: Prevents a new lobby from being created when finding a lobby. If no lobby is found, aMATCHMAKER_LOBBY_NOT_FOUND
error will be thrown.captcha(CaptchaConfig)
/set_captcha(Option<CaptchaConfig>)
: Methods to verify a captcha.origin(impl Into<String>)
/set_origin(Option<String>)
: (undocumented)
- On success, responds with
FindLobbyOutput
with field(s):lobby(Option<MatchmakerLobbyJoinInfo>)
: A matchmaker lobby.
- On failure, responds with
SdkError<FindLobbyError>
sourcepub fn join_lobby(&self) -> JoinLobby<C, M, R>
pub fn join_lobby(&self) -> JoinLobby<C, M, R>
Constructs a fluent builder for the JoinLobby
operation.
- The fluent builder is configurable:
lobby_id(impl Into<String>)
/set_lobby_id(Option<String>)
: A universally unique identifier.captcha(CaptchaConfig)
/set_captcha(Option<CaptchaConfig>)
: Methods to verify a captcha.
- On success, responds with
JoinLobbyOutput
with field(s):lobby(Option<MatchmakerLobbyJoinInfo>)
: A matchmaker lobby.
- On failure, responds with
SdkError<JoinLobbyError>
sourcepub fn list_lobbies(&self) -> ListLobbies<C, M, R>
pub fn list_lobbies(&self) -> ListLobbies<C, M, R>
Constructs a fluent builder for the ListLobbies
operation.
- The fluent builder takes no input, just
send
it. - On success, responds with
ListLobbiesOutput
with field(s):game_modes(Option<Vec<GameModeInfo>>)
: (undocumented)regions(Option<Vec<RegionInfo>>)
: (undocumented)lobbies(Option<Vec<LobbyInfo>>)
: (undocumented)
- On failure, responds with
SdkError<ListLobbiesError>
sourcepub fn list_regions(&self) -> ListRegions<C, M, R>
pub fn list_regions(&self) -> ListRegions<C, M, R>
Constructs a fluent builder for the ListRegions
operation.
- The fluent builder takes no input, just
send
it. - On success, responds with
ListRegionsOutput
with field(s):regions(Option<Vec<RegionInfo>>)
: (undocumented)
- On failure, responds with
SdkError<ListRegionsError>
sourcepub fn lobby_ready(&self) -> LobbyReady<C, M, R>
pub fn lobby_ready(&self) -> LobbyReady<C, M, R>
Constructs a fluent builder for the LobbyReady
operation.
- The fluent builder takes no input, just
send
it. - On success, responds with
LobbyReadyOutput
- On failure, responds with
SdkError<LobbyReadyError>
sourcepub fn player_connected(&self) -> PlayerConnected<C, M, R>
pub fn player_connected(&self) -> PlayerConnected<C, M, R>
Constructs a fluent builder for the PlayerConnected
operation.
- The fluent builder is configurable:
player_token(impl Into<String>)
/set_player_token(Option<String>)
: A JSON Web Token. Slightly modified to include a description prefix and use Protobufs of JSON.
- On success, responds with
PlayerConnectedOutput
- On failure, responds with
SdkError<PlayerConnectedError>
sourcepub fn player_disconnected(&self) -> PlayerDisconnected<C, M, R>
pub fn player_disconnected(&self) -> PlayerDisconnected<C, M, R>
Constructs a fluent builder for the PlayerDisconnected
operation.
- The fluent builder is configurable:
player_token(impl Into<String>)
/set_player_token(Option<String>)
: A JSON Web Token. Slightly modified to include a description prefix and use Protobufs of JSON.
- On success, responds with
PlayerDisconnectedOutput
- On failure, responds with
SdkError<PlayerDisconnectedError>
sourcepub fn set_lobby_closed(&self) -> SetLobbyClosed<C, M, R>
pub fn set_lobby_closed(&self) -> SetLobbyClosed<C, M, R>
Constructs a fluent builder for the SetLobbyClosed
operation.
- The fluent builder is configurable:
is_closed(bool)
/set_is_closed(Option<bool>)
: (undocumented)
- On success, responds with
SetLobbyClosedOutput
- On failure, responds with
SdkError<SetLobbyClosedError>
Trait Implementations
sourceimpl Deref for ClientWrapper
impl Deref for ClientWrapper
Auto Trait Implementations
impl !RefUnwindSafe for ClientWrapper
impl Send for ClientWrapper
impl Sync for ClientWrapper
impl Unpin for ClientWrapper
impl !UnwindSafe for ClientWrapper
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more