into_buf.rs
SHA-256d982cb82f3f2ddba863366c36f9f6041b2076e7bb8906e882e47ef65742974db
Malecule∅
Evidence
1use super::{Buf};
2
3use std::io;
4
5/// Conversion into a `Buf`
6///
7/// An `IntoBuf` implementation defines how to convert a value into a `Buf`.
8/// This is common for types that represent byte storage of some kind. `IntoBuf`
9/// may be implemented directly for types or on …
13:7… `
14/// use bytes::{Buf, IntoBuf, BigEndian};
15///
16/// let bytes = b"\x00\x01hello world";
17/// let mut buf = bytes.into_buf();
18///
⋯4 lines
24:28… d", &rest);
25/// ```
26pub trait IntoBuf {
27 /// The `Buf` type that `self` is being converted into
28 type Buf: Buf;
29
30 /// Creates a `Buf` from …