pub struct JointClient<A, T>where
A: DeserializeOwned + Serialize + Send + Sync + 'static,
T: DeserializeOwned + Send + Sync + 'static,{
pub client_id: Option<Arc<Mutex<u64>>>,
pub room_id: Option<Arc<Mutex<u64>>>,
/* private fields */
}Fields§
§client_id: Option<Arc<Mutex<u64>>>§room_id: Option<Arc<Mutex<u64>>>Implementations§
Source§impl<A, T> JointClient<A, T>where
A: DeserializeOwned + Serialize + Send + Sync + 'static,
T: DeserializeOwned + Send + Sync + 'static,
impl<A, T> JointClient<A, T>where
A: DeserializeOwned + Serialize + Send + Sync + 'static,
T: DeserializeOwned + Send + Sync + 'static,
pub fn new() -> Self
pub async fn register_handler(&mut self, handler: Handler<A, T>)
pub async fn connect(&mut self, addr: &str) -> Result<()>
pub async fn listen(&self) -> Result<()>
pub async fn create_room(&self) -> Result<()>
pub async fn join_room(&self, room_id: u64) -> Result<()>
pub async fn leave_room(&self) -> Result<()>
pub async fn dispatch_action(&self, action: A) -> Result<()>
Auto Trait Implementations§
impl<A, T> !RefUnwindSafe for JointClient<A, T>
impl<A, T> !UnwindSafe for JointClient<A, T>
impl<A, T> Freeze for JointClient<A, T>
impl<A, T> Send for JointClient<A, T>
impl<A, T> Sync for JointClient<A, T>
impl<A, T> Unpin for JointClient<A, T>
impl<A, T> UnsafeUnpin for JointClient<A, T>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more