pub struct MinetestClient { /* private fields */ }
Implementations§
Source§impl MinetestClient
impl MinetestClient
pub async fn connect(connect_to: SocketAddr) -> Result<Self>
Sourcepub async fn recv(&mut self) -> Result<ToClientCommand>
pub async fn recv(&mut self) -> Result<ToClientCommand>
If this fails, the client has disconnected.
Sourcepub async fn send(&mut self, command: ToServerCommand) -> Result<()>
pub async fn send(&mut self, command: ToServerCommand) -> Result<()>
If this fails, the client has disconnected.
Auto Trait Implementations§
impl Freeze for MinetestClient
impl RefUnwindSafe for MinetestClient
impl Send for MinetestClient
impl Sync for MinetestClient
impl Unpin for MinetestClient
impl UnwindSafe for MinetestClient
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