Remove debug requirement for emitted payloads since its not used anyway

Signed-off-by: trivernis <trivernis@protonmail.com>
pull/21/head
trivernis 3 years ago
parent 9497990fb7
commit 7b0413704c
Signed by: Trivernis
GPG Key ID: DFFFCC2C7A02DB45

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