buttplug-developer-guide icon indicating copy to clipboard operation
buttplug-developer-guide copied to clipboard

You suggest using rust, but there is no rust example Application

Open catqwe opened this issue 2 years ago • 1 comments

At the start of the guide you suggest using Rust because is the language in which this Buttplug is writen but in https://buttplug-developer-guide.docs.buttplug.io/docs/dev-guide/writing-buttplug-applications/application there is just and example written in C# but no example in Rust, but developers that have no experience with rust and that want to introduce themself to this language trying things with this library would be great to have an example in Rust. (Which is my case)

Thank you! :smile:

catqwe avatar Jan 09 '23 12:01 catqwe

Also when I try to build the examples I'm getting errors, for the example buttplug-developer-guide/examples/rust/src/bin/connection.rs I'm getting:

error[E0599]: no method named `connect_in_process` found for struct `ButtplugClient` in the current scope
  --> src/main.rs:19:10
   |
19 |   client.connect_in_process(None).await?;
   |          ^^^^^^^^^^^^^^^^^^ help: there is a method with a similar name: `connected`

error[E0616]: field `name` of struct `ButtplugClientDevice` is private
  --> src/main.rs:26:51
   |
26 |           println!("Device {} Connected!", device.name);
   |                                                   ^^^^ private field
   |
help: a method `name` also exists, call it with parentheses
   |
26 |           println!("Device {} Connected!", device.name());
   |                                                       ++

error[E0616]: field `name` of struct `ButtplugClientDevice` is private
  --> src/main.rs:29:47
   |
29 |           println!("Device {} Removed!", info.name);
   |                                               ^^^^ private field
   |
help: a method `name` also exists, call it with parentheses
   |
29 |           println!("Device {} Removed!", info.name());
   |                                                   ++

error[E0616]: field `name` of struct `ButtplugClientDevice` is private
  --> src/main.rs:57:29
   |
57 |     println!("- {}", device.name);
   |                             ^^^^ private field
   |
help: a method `name` also exists, call it with parentheses
   |
57 |     println!("- {}", device.name());

catqwe avatar Jan 09 '23 12:01 catqwe