message: doc: Update example to use task spawning for device updates
  Show that devices can be sent to other tasks.
diff: use async_std::task;
  use buttplug::{
  - client::{device::VibrateCommand, ButtplugClient, ButtplugClientEvent},
  + client::{
  + device::ButtplugClientDevice, device::VibrateCommand, ButtplugClient, ButtplugClientEvent,
  + },
  core::messages::ButtplugDeviceMessageType,
  };
  use futures::StreamExt;
  use std::time::Duration;
  async fn device_control_example() {
  + env_logger::init();
  // Onto the final example! Controlling devices.
  // Instead of setting up our own connector for this example, we'll use the
  @@ -37,27 +40,8 @@ async fn device_control_example() {
  return;
  }
  - let mut device = None;
  - loop {
  - match event_stream.next().await.unwrap() {
  - ButtplugClientEvent::DeviceAdded(dev) => {
  - println!("We got a device: {}", dev.name);
  - device = Some(dev);
  - break;
  - }
  - ButtplugClientEvent::ServerDisconnect => {
  - // The server disconnected, which means we're done here, so just
  - // break up to the top level.
  - println!("Server disconnected!");
  - break;
  - }
  - _ => {
  - // Something else happened, like scanning finishing, devices
  - // getting removed, etc... Might as well say something about it.
  - println!("Got some other kind of event we don't care about");
  - }
  - }
  - }
  + let vibrate_device = |dev: ButtplugClientDevice| {
  + async move {
  // Ok, so we now have a connected client with a device set up. Let's start
  // sending some messages to make the device do things!
  //
  @@ -65,7 +49,7 @@ async fn device_control_example() {
  // is enough to assume that device is connected to the server and ready to
  // use. So if a client has a device in its list, we can just start sending
  // control messages.
  - if let Some(dev) = device {
  + //
  // We'll need to see which messages our device handles. Luckily, devices
  // hold this information for you to query.
  //
  @@ -117,6 +101,32 @@ async fn device_control_example() {
  println!("{} doesn't vibrate! This example should be updated to handle rotation and linear movement!", dev.name);
  }
  }
  + };
  +
  + loop {
  + match event_stream.next().await.unwrap() {
  + ButtplugClientEvent::DeviceAdded(dev) => {
  + println!("We got a device: {}", dev.name);
  + let fut = vibrate_device(dev);
  + task::spawn(async move {
  + fut.await;
  + });
  + // break;
  + }
  + ButtplugClientEvent::ServerDisconnect => {
  + // The server disconnected, which means we're done here, so just
  + // break up to the top level.
  + println!("Server disconnected!");
  + break;
  + }
  + _ => {
  + // Something else happened, like scanning finishing, devices
  + // getting removed, etc... Might as well say something about it.
  + println!("Got some other kind of event we don't care about");
  + }
  + }
  + }
  +
  // And now we're done!
  println!("Exiting example");
  }
  