diff --git a/Cargo.lock b/Cargo.lock index 6dff7535..1e339cbc 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -93,7 +93,7 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bromine" -version = "0.17.0" +version = "0.17.1" dependencies = [ "async-trait", "bincode", diff --git a/Cargo.toml b/Cargo.toml index 1a6e3cd4..d6285cf8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "bromine" -version = "0.17.0" +version = "0.17.1" authors = ["trivernis "] edition = "2018" readme = "README.md" diff --git a/README.md b/README.md index 128ebc47..6a4c26ad 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ async fn main() { .build_client().await.unwrap(); // emit an initial event - let response = ctx.emit("ping", ()).await?.await_response(&ctx).await?; + let response = ctx.emit("ping", ()).await_response().await?; } ``` @@ -80,8 +80,8 @@ async fn main() { .build_client().await.unwrap(); // emit an initial event - let response = ctx.emit_to("mainspace-server", "ping", ()).await? - .await_response(&ctx).await?; + let response = ctx.emit_to("mainspace-server", "ping", ()) + .await_response().await?; } ``` diff --git a/src/ipc/stream_emitter.rs b/src/ipc/stream_emitter.rs index 91249083..fb058198 100644 --- a/src/ipc/stream_emitter.rs +++ b/src/ipc/stream_emitter.rs @@ -164,14 +164,14 @@ impl EventMetadata

{ pub struct EmitMetadata { event_metadata: Option>, stream: Option, - fut: Option> + Send>>>, + fut: Option> + Send + Sync>>>, } /// A metadata object returned after waiting for a reply to an event /// This object needs to be awaited for to get the actual reply pub struct EmitMetadataWithResponse { timeout: Option, - fut: Option>>>>, + fut: Option> + Send + Sync>>>, emit_metadata: Option>, } @@ -217,7 +217,7 @@ impl Unpin for EmitMetadata

{} impl Unpin for EmitMetadataWithResponse

{} -impl Future for EmitMetadata

{ +impl Future for EmitMetadata

{ type Output = Result; fn poll(mut self: Pin<&mut Self>, cx: &mut std::task::Context<'_>) -> Poll { @@ -244,7 +244,7 @@ impl Future for EmitMetadata

{ } } -impl Future for EmitMetadataWithResponse

{ +impl Future for EmitMetadataWithResponse

{ type Output = Result; fn poll(mut self: Pin<&mut Self>, cx: &mut std::task::Context<'_>) -> Poll {