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

can not implement "cargo install" #9

Open
nelzhang02184516 opened this issue Aug 21, 2020 · 0 comments
Open

can not implement "cargo install" #9

nelzhang02184516 opened this issue Aug 21, 2020 · 0 comments

Comments

@nelzhang02184516
Copy link

warning: Using cargo install to install the binaries for the package in current working directory is deprecated, use cargo install --path . instead. Use cargo build if you want to simply build the package.
Installing kafka-benchmark v0.2.0 (/home/zyh/kafka-benchmark)
Updating crates.io index
Updating git repository https://github.com/fede1024/rust-rdkafka.git
Compiling kafka-benchmark v0.2.0 (/home/zyh/kafka-benchmark)
error[E0432]: unresolved import rdkafka::util::duration_to_millis
--> src/units.rs:1:5
|
1 | use rdkafka::util::duration_to_millis;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no duration_to_millis in util

error[E0277]: the trait bound rdkafka::consumer::StreamConsumer: rdkafka::consumer::Consumer is not satisfied
--> src/consumer/mod.rs:105:36
|
51 | fn initialize_consumer<T: FromClientConfig + Consumer>(scenario: &ConsumerScenario) -> T {
| ------------------- -------- required by this bound in consumer::initialize_consumer
...
105 | let consumer: StreamConsumer = initialize_consumer(scenario);
| ^^^^^^^^^^^^^^^^^^^ the trait rdkafka::consumer::Consumer is not implemented for rdkafka::consumer::StreamConsumer
|
= help: the following implementations were found:
<rdkafka::consumer::StreamConsumer as rdkafka::consumer::Consumer<rdkafka::consumer::stream_consumer::StreamConsumerContext>>

error[E0599]: no method named wait found for struct rdkafka::consumer::MessageStream<'_, rdkafka::consumer::DefaultConsumerContext> in the current scope
--> src/consumer/mod.rs:120:37
|
120 | for message in consumer.start().wait() {
| ^^^^ method not found in rdkafka::consumer::MessageStream<'_, rdkafka::consumer::DefaultConsumerContext>
|
::: /root/.cargo/git/checkouts/rust-rdkafka-34d944143d921bb0/2901a4b/src/consumer/stream_consumer.rs:94:1
|
94 | / pub struct MessageStream<
95 | | 'a,
96 | | C,
97 | | // Ugly, but this provides backwards compatibility when the tokio feature
... |
108 | | no_message_error: bool,
109 | | }
| |_- doesn't satisfy _: futures::Stream
|
= note: the method wait exists but the following trait bounds were not satisfied:
rdkafka::consumer::MessageStream<'_, rdkafka::consumer::DefaultConsumerContext>: futures::Stream
which is required by &mut rdkafka::consumer::MessageStream<'_, rdkafka::consumer::DefaultConsumerContext>: futures::Stream

error[E0599]: no method named send_copy found for struct rdkafka::producer::BaseProducer<producer::BenchmarkProducerContext> in the current scope
--> src/producer/mod.rs:55:10
|
55 | .send_copy::<str, str>(&scenario.topic, None, Some("warmup"), None, (), None)
| ^^^^^^^^^ method not found in rdkafka::producer::BaseProducer<producer::BenchmarkProducerContext>

error[E0599]: no method named send_copy found for struct rdkafka::producer::BaseProducer<producer::BenchmarkProducerContext> in the current scope
--> src/producer/mod.rs:68:28
|
68 | match producer.send_copy::<[u8], [u8]>(
| ^^^^^^^^^ method not found in rdkafka::producer::BaseProducer<producer::BenchmarkProducerContext>

error[E0599]: no method named wait found for struct rdkafka::producer::DeliveryFuture in the current scope
--> src/producer/mod.rs:96:22
|
96 | match future.wait() {
| ^^^^ method not found in rdkafka::producer::DeliveryFuture
|
::: /root/.cargo/git/checkouts/rust-rdkafka-34d944143d921bb0/2901a4b/src/producer/future_producer.rs:219:1
|
219 | pub struct DeliveryFuture {
| ------------------------- doesn't satisfy rdkafka::producer::DeliveryFuture: futures::Future
|
= note: the method wait exists but the following trait bounds were not satisfied:
rdkafka::producer::DeliveryFuture: futures::Future
which is required by &mut rdkafka::producer::DeliveryFuture: futures::Future

error[E0599]: no method named send_copy found for struct rdkafka::producer::FutureProducer in the current scope
--> src/producer/mod.rs:119:10
|
119 | .send_copy::<str, str>(&scenario.topic, None, Some("warmup"), None, None, 1000)
| ^^^^^^^^^ method not found in rdkafka::producer::FutureProducer

error[E0599]: no method named send_copy found for struct rdkafka::producer::FutureProducer in the current scope
--> src/producer/mod.rs:131:31
|
131 | futures.push(producer.send_copy::<[u8], [u8]>(
| ^^^^^^^^^ method not found in rdkafka::producer::FutureProducer

warning: unused import: futures::Stream
--> src/consumer/mod.rs:4:5
|
4 | use futures::Stream;
| ^^^^^^^^^^^^^^^
|
= note: #[warn(unused_imports)] on by default

warning: unused import: Future
--> src/producer/mod.rs:1:21
|
1 | use futures::{self, Future};
| ^^^^^^

error: aborting due to 8 previous errors

Some errors have detailed explanations: E0277, E0432, E0599.
For more information about an error, try rustc --explain E0277.
error: failed to compile kafka-benchmark v0.2.0 (/home/zyh/kafka-benchmark), intermediate artifacts can be found at /home/zyh/kafka-benchmark/target

Caused by:
could not compile kafka-benchmark.

To learn more, run the command again with --verbose.

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

1 participant