Struct nakama_rs::api_client::ApiClient[][src]

pub struct ApiClient {
    pub session_id: Option<String>,
    pub matchmaker_token: Option<String>,
    // some fields omitted
}

Statefull, non-blocking nakama client. Works as a state machine - all calls are non-blocking, but may modify some internal ApiClient state and therefore results of other calls in the future.

Fields

session_id: Option<String>matchmaker_token: Option<String>

Implementations

impl ApiClient[src]

pub fn new(key: &str, server: &str, port: u32, protocol: &str) -> ApiClient[src]

pub fn in_progress(&self) -> bool[src]

pub fn authenticate(&mut self, email: &str, password: &str)[src]

pub fn register(&mut self, email: &str, password: &str, username: &str)[src]

pub fn username(&self) -> Option<String>[src]

pub fn rpc(&mut self, name: &str, body: &str)[src]

pub fn logout(&mut self)[src]

pub fn authenticated(&self) -> bool[src]

pub fn write_leaderboard_record(&mut self, leaderboard_id: &str, score: i32)[src]

pub fn list_leaderboard_records(&mut self, leaderboard_id: &str)[src]

pub fn leaderboard_records(
    &self,
    leaderboard_id: &str
) -> Option<Rc<ApiLeaderboardRecordList>>
[src]

pub fn try_recv(&mut self) -> Option<Event>[src]

pub fn tick(&mut self)[src]

pub fn match_id(&self) -> Option<String>[src]

pub fn rpc_response(&self) -> Option<String>[src]

pub fn socket_add_matchmaker(&mut self, matchmaker: &Matchmaker)[src]

pub fn socket_create_match(&mut self) -> u32[src]

pub fn socket_join_match_by_id(&mut self, match_id: &str) -> u32[src]

pub fn socket_join_match_by_token(&mut self, token_id: &str) -> u32[src]

pub fn socket_leave_match(&mut self) -> u32[src]

pub fn socket_send<T: SerBin>(&mut self, opcode: i32, data: &T)[src]

pub fn socket_response(&self, cid: u32) -> Option<SocketEvent>[src]

pub fn error(&self) -> Option<String>[src]

Auto Trait Implementations

impl !RefUnwindSafe for ApiClient

impl !Send for ApiClient

impl !Sync for ApiClient

impl Unpin for ApiClient

impl !UnwindSafe for ApiClient

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.