We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I am having problems passing a sender as a parameter to a function.
The following code:
use async_std::sync::channel; use async_std::io; use async_std::prelude::*; use async_std::task; fn main() -> io::Result<()> { task::block_on(async { let (s, r) = channel::<i32>(1); let webcam = start_service(&s); Ok(()) }) } async fn start_service(s : &async_std::sync::channel::Sender<i32>) -> () { }
gives the following error:
error[E0603]: module `channel` is private --> src\main.rs:15:46 | 15 | async fn start_service(s : &async_std::sync::channel::Sender) -> () { | ^^^^^^^
Is it an error or am I using it incorrectly?
Thanks for an awesome crate!
The text was updated successfully, but these errors were encountered:
it is reexported at the top level async_std::sync::Sender should work.
async_std::sync::Sender
Sorry, something went wrong.
Awesome! Thanks!
@dignifiedquire is right; going to go ahead and close this issue.
However we should probably file a backlink from Sender and Receiver to channel so it becomes a bit more discoverable. Thanks!
Sender
Receiver
channel
Successfully merging a pull request may close this issue.
I am having problems passing a sender as a parameter to a function.
The following code:
gives the following error:
Is it an error or am I using it incorrectly?
Thanks for an awesome crate!
The text was updated successfully, but these errors were encountered: