Update client.rs

meant to add this earlier
This commit is contained in:
michael-bailey 2022-03-01 11:44:11 +00:00
parent 0e45c4e803
commit 7b148e9b6e
1 changed files with 8 additions and 2 deletions

View File

@ -21,8 +21,11 @@ use foundation::prelude::IManager;
use crate::messages::{ClientMessage};
/// #
/// Messages that are sent internally
/// when functions are called on the client
#[derive(Serialize, Deserialize)]
enum ClientOutMessage {
enum ClientInMessage {
MessageTo,
UpdateRequest,
}
@ -40,7 +43,8 @@ enum ClientOutMessage {
#[derive(Debug)]
pub struct Client<Out: 'static>
where
Out: From<ClientMessage> + Send{
Out: From<ClientMessage> + Send
{
pub details: ClientDetails,
// server send channel
@ -117,6 +121,8 @@ impl<Out> Client<Out>
);
}
#[deprecated]
pub async fn send_message(self: &Arc<Client<Out>>, msg: ClientMessage) {
let _ = self.tx.send(msg).await;