Skip to content
This repository has been archived by the owner on Feb 3, 2023. It is now read-only.

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

Open
catqwe opened this issue Jan 9, 2023 · 1 comment
Open

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

catqwe opened this issue Jan 9, 2023 · 1 comment

Comments

@catqwe
Copy link

catqwe commented Jan 9, 2023

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! 😄

@catqwe
Copy link
Author

catqwe commented Jan 9, 2023

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());

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant