pub struct ChatClient { /* private fields */ }Implementations§
Source§impl ChatClient
impl ChatClient
pub async fn start(uri: &str) -> Result<ChatClient>
pub async fn message_listener( read_stream: SplitStream<WebSocketStream<MaybeTlsStream<TcpStream>>>, uri: String, command_waiters: Arc<Mutex<HashMap<String, Sender<ChatResponse>>>>, message_queue: Sender<ChatSrvResponse>, )
pub async fn send_command(&mut self, command: &str) -> Result<ChatResponse>
pub async fn next_message(&mut self) -> Result<ChatSrvResponse>
pub async fn api_get_active_user(&mut self) -> Result<User>
pub async fn api_chats(&mut self) -> Result<Vec<Chat>>
pub async fn api_get_user_address(&mut self) -> Result<Option<String>>
pub async fn api_create_user_address(&mut self) -> Result<String>
Trait Implementations§
Source§impl Debug for ChatClient
impl Debug for ChatClient
Auto Trait Implementations§
impl !Freeze for ChatClient
impl !RefUnwindSafe for ChatClient
impl Send for ChatClient
impl !Sync for ChatClient
impl Unpin for ChatClient
impl !UnwindSafe for ChatClient
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