[−][src]Trait it_to_bytes::ToBytes
A trait for converting a value to bytes.
Required methods
pub fn to_bytes(&self, writer: &mut W) -> Result<()>
[src]
Converts the given value into &[u8]
in the given writer
.
Implementations on Foreign Types
impl<W> ToBytes<W> for u8 where
W: Write,
[src]
W: Write,
Encode a u8
into a byte (well, it's already a byte!).
impl<W> ToBytes<W> for u64 where
W: Write,
[src]
W: Write,
Encode a u64
into bytes with a LEB128 representation.
Decoder is decoders::binary::uleb
.
impl<W> ToBytes<W> for &str where
W: Write,
[src]
W: Write,
Encode a str
into bytes.
Decoder is decoders::binary::string
.
impl<W> ToBytes<W> for String where
W: Write,
[src]
W: Write,
Encode a String into bytes.
Decoder is decoders::binary::string
.
impl<W, I> ToBytes<W> for Vec<I> where
W: Write,
I: ToBytes<W>,
[src]
W: Write,
I: ToBytes<W>,
Encode a vector into bytes.
Decoder is decoders::binary::list
.