Struct serde_bytes::Bytes [−][src]
Wrapper around [u8]
to serialize and deserialize efficiently.
use std::collections::HashMap; use std::io; use serde_bytes::Bytes; fn print_encoded_cache() -> bincode::Result<()> { let mut cache = HashMap::new(); cache.insert(3, Bytes::new(b"three")); cache.insert(2, Bytes::new(b"two")); cache.insert(1, Bytes::new(b"one")); bincode::serialize_into(&mut io::stdout(), &cache) }
Implementations
impl Bytes
[src][−]
Trait Implementations
impl AsMut<[u8]> for Bytes
[src][+]
impl AsRef<[u8]> for Bytes
[src][+]
impl Borrow<Bytes> for ByteBuf
[src][+]
impl BorrowMut<Bytes> for ByteBuf
[src][+]
impl Debug for Bytes
[src][+]
impl<'a> Default for &'a Bytes
[src][+]
impl Deref for Bytes
[src][+]
impl DerefMut for Bytes
[src][+]
impl<'de: 'a, 'a> Deserialize<'de> for &'a Bytes
[src][+]
impl<'a, 'de: 'a> Deserialize<'de> for &'a Bytes
[src][+]
impl Eq for Bytes
[src]
impl Hash for Bytes
[src][+]
impl<'a> IntoIterator for &'a Bytes
[src][+]
impl<'a> IntoIterator for &'a mut Bytes
[src][+]
impl Ord for Bytes
[src][+]
impl<Rhs: ?Sized> PartialEq<Rhs> for Bytes where
Rhs: AsRef<[u8]>,
[src][+]
Rhs: AsRef<[u8]>,
impl<Rhs: ?Sized> PartialOrd<Rhs> for Bytes where
Rhs: AsRef<[u8]>,
[src][+]
Rhs: AsRef<[u8]>,