We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 076a244 commit 1bf37ceCopy full SHA for 1bf37ce
rust/sbp/src/de.rs
@@ -4,7 +4,7 @@ use std::{
4
time::{Duration, Instant},
5
};
6
7
-use bytes::{Buf, BytesMut};
+use bytes::{Buf, Bytes, BytesMut};
8
use dencode::FramedRead;
9
10
#[cfg(feature = "async")]
@@ -360,6 +360,18 @@ impl Frame {
360
}
361
362
363
+impl From<Frame> for BytesMut {
364
+ fn from(Frame(buf): Frame) -> Self {
365
+ buf
366
+ }
367
+}
368
+
369
+impl From<Frame> for Bytes {
370
371
+ buf.into()
372
373
374
375
struct TimeoutDecoderImpl<D> {
376
timeout_duration: Duration,
377
last_msg_received: Instant,
0 commit comments