Struct nakama_rs::api_client::ApiClient [−][src]
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]
&self,
leaderboard_id: &str
) -> Option<Rc<ApiLeaderboardRecordList>>
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,