pub struct LocalClientSocket { /* private fields */ }Implementations§
Source§impl LocalClientSocket
impl LocalClientSocket
pub fn new( tx: UnboundedSender<ClientMessage>, rx: UnboundedReceiver<ServerMessage>, closed: Receiver<()>, ) -> Self
pub async fn send_msg(&self, msg: ClientMessage) -> ConnectionResult<()>
pub async fn receive_msg(&mut self) -> ConnectionResult<Option<ServerMessage>>
pub async fn close(self) -> ConnectionResult<()>
pub fn spawn_api_forward_loop( api: impl WbApi + Send + Sync + 'static, crx: UnboundedReceiver<ClientMessage>, stx: UnboundedSender<ServerMessage>, )
Auto Trait Implementations§
impl Freeze for LocalClientSocket
impl !RefUnwindSafe for LocalClientSocket
impl Send for LocalClientSocket
impl Sync for LocalClientSocket
impl Unpin for LocalClientSocket
impl !UnwindSafe for LocalClientSocket
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