Merge pull request #21 from Trivernis/develop

Remove debug requirement for emitted payloads since its not used anyway
pull/24/head
Julius Riegel 3 years ago committed by GitHub
commit 0c65dede74
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

2
Cargo.lock generated

@ -511,7 +511,7 @@ dependencies = [
[[package]]
name = "rmp-ipc"
version = "0.9.1"
version = "0.9.2"
dependencies = [
"async-trait",
"byteorder",

@ -1,6 +1,6 @@
[package]
name = "rmp-ipc"
version = "0.9.1"
version = "0.9.2"
authors = ["trivernis <trivernis@protonmail.com>"]
edition = "2018"
readme = "README.md"

@ -39,7 +39,7 @@ where
/// A payload wrapper type for sending bytes directly without
/// serializing them
#[derive(Clone, Debug)]
#[derive(Clone)]
pub struct BytePayload {
bytes: Vec<u8>,
}

@ -4,7 +4,6 @@ use crate::events::event::Event;
use crate::events::payload::EventSendPayload;
use crate::ipc::context::Context;
use crate::protocol::AsyncProtocolStream;
use std::fmt::Debug;
use std::sync::Arc;
use tokio::io::AsyncWriteExt;
use tokio::sync::Mutex;
@ -38,7 +37,7 @@ where
}
#[tracing::instrument(level = "trace", skip(self, data))]
pub async fn _emit<T: EventSendPayload + Debug>(
pub async fn _emit<T: EventSendPayload>(
&self,
namespace: Option<&str>,
event: &str,
@ -66,7 +65,7 @@ where
}
/// Emits an event
pub async fn emit<S: AsRef<str>, T: EventSendPayload + Debug>(
pub async fn emit<S: AsRef<str>, T: EventSendPayload>(
&self,
event: S,
data: T,
@ -75,7 +74,7 @@ where
}
/// Emits an event to a specific namespace
pub async fn emit_to<S1: AsRef<str>, S2: AsRef<str>, T: EventSendPayload + Debug>(
pub async fn emit_to<S1: AsRef<str>, S2: AsRef<str>, T: EventSendPayload>(
&self,
namespace: S1,
event: S2,
@ -86,7 +85,7 @@ where
}
/// Emits a response to an event
pub async fn emit_response<S: AsRef<str>, T: EventSendPayload + Debug>(
pub async fn emit_response<S: AsRef<str>, T: EventSendPayload>(
&self,
event_id: u64,
event: S,
@ -96,7 +95,7 @@ where
}
/// Emits a response to an event to a namespace
pub async fn emit_response_to<S1: AsRef<str>, S2: AsRef<str>, T: EventSendPayload + Debug>(
pub async fn emit_response_to<S1: AsRef<str>, S2: AsRef<str>, T: EventSendPayload>(
&self,
event_id: u64,
namespace: S1,

Loading…
Cancel
Save