Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

module peripheral is private #34

Closed
osynge opened this issue May 10, 2019 · 2 comments
Closed

module peripheral is private #34

osynge opened this issue May 10, 2019 · 2 comments

Comments

@osynge
Copy link

osynge commented May 10, 2019

After expanding beyond the basic example I wanted to pass the Peripheral to a function to act on it. Sadly whenever I put "rumble::bluez::adapter::peripheral::Peripheral" in the parameters I get the following error:

error[E0603]: module `peripheral` is private
@mwylde
Copy link
Owner

mwylde commented May 20, 2019

Thanks for checking out rumble! The reason Peripheral is private is because it's intended as an implementation detail of the bluez (linux) implementation. Instead, try using the rumble::api::Peripheral trait.

For example:

use rumble::api::Peripheral;

fn handle_peripheral<P: Peripheral + 'static>(peripheral: P) {
...
}

@osynge
Copy link
Author

osynge commented Aug 10, 2019

Thankyou this explains the issue, but please see thread #7 for clarification.

@osynge osynge closed this as completed Aug 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants