Implement EventReceivePayload for BytePayload

Signed-off-by: trivernis <trivernis@protonmail.com>
pull/12/head
trivernis 3 years ago
parent 2e1fdfa5ac
commit 27a4f4db85
Signed by: Trivernis
GPG Key ID: DFFFCC2C7A02DB45

@ -54,3 +54,12 @@ impl EventSendPayload for BytePayload {
Ok(self.bytes)
}
}
impl EventReceivePayload for BytePayload {
fn from_payload_bytes<R: Read>(mut reader: R) -> IPCResult<Self> {
let mut buf = Vec::new();
reader.read_to_end(&mut buf)?;
Ok(Self::new(buf))
}
}

Loading…
Cancel
Save