Trait bytevec::ByteEncodable
[−]
[src]
pub trait ByteEncodable { fn get_size<Size>(&self) -> Option<Size> where Size: BVSize + ByteEncodable; fn encode<Size>(&self) -> BVEncodeResult<Vec<u8>> where Size: BVSize + ByteEncodable; }
Provides serialization functionality for the implementing types.
Required Methods
fn get_size<Size>(&self) -> Option<Size> where Size: BVSize + ByteEncodable
Returns the total length of the byte buffer
than can be obtained through the encode
method
fn encode<Size>(&self) -> BVEncodeResult<Vec<u8>> where Size: BVSize + ByteEncodable
Returs a byte representation of the original data object
Implementors
impl ByteEncodable for str
impl<'a> ByteEncodable for &'a str
impl ByteEncodable for String
impl<T> ByteEncodable for Vec<T> where T: ByteEncodable
impl<T> ByteEncodable for [T] where T: ByteEncodable
impl<T> ByteEncodable for HashSet<T> where T: ByteEncodable + Eq + Hash
impl<K, V> ByteEncodable for HashMap<K, V> where K: ByteEncodable + Hash + Eq, V: ByteEncodable
impl<A, B, C, D, E, F, G, H, I, J, K, L> ByteEncodable for (A, B, C, D, E, F, G, H, I, J, K, L) where A: ByteEncodable, B: ByteEncodable, C: ByteEncodable, D: ByteEncodable, E: ByteEncodable, F: ByteEncodable, G: ByteEncodable, H: ByteEncodable, I: ByteEncodable, J: ByteEncodable, K: ByteEncodable, L: ByteEncodable
impl<'a, A, B, C, D, E, F, G, H, I, J, K, L> ByteEncodable for &'a (&'a A, &'a B, &'a C, &'a D, &'a E, &'a F, &'a G, &'a H, &'a I, &'a J, &'a K, &'a L) where A: ByteEncodable, B: ByteEncodable, C: ByteEncodable, D: ByteEncodable, E: ByteEncodable, F: ByteEncodable, G: ByteEncodable, H: ByteEncodable, I: ByteEncodable, J: ByteEncodable, K: ByteEncodable, L: ByteEncodable
impl<B, C, D, E, F, G, H, I, J, K, L> ByteEncodable for (B, C, D, E, F, G, H, I, J, K, L) where B: ByteEncodable, C: ByteEncodable, D: ByteEncodable, E: ByteEncodable, F: ByteEncodable, G: ByteEncodable, H: ByteEncodable, I: ByteEncodable, J: ByteEncodable, K: ByteEncodable, L: ByteEncodable
impl<'a, B, C, D, E, F, G, H, I, J, K, L> ByteEncodable for &'a (&'a B, &'a C, &'a D, &'a E, &'a F, &'a G, &'a H, &'a I, &'a J, &'a K, &'a L) where B: ByteEncodable, C: ByteEncodable, D: ByteEncodable, E: ByteEncodable, F: ByteEncodable, G: ByteEncodable, H: ByteEncodable, I: ByteEncodable, J: ByteEncodable, K: ByteEncodable, L: ByteEncodable
impl<C, D, E, F, G, H, I, J, K, L> ByteEncodable for (C, D, E, F, G, H, I, J, K, L) where C: ByteEncodable, D: ByteEncodable, E: ByteEncodable, F: ByteEncodable, G: ByteEncodable, H: ByteEncodable, I: ByteEncodable, J: ByteEncodable, K: ByteEncodable, L: ByteEncodable
impl<'a, C, D, E, F, G, H, I, J, K, L> ByteEncodable for &'a (&'a C, &'a D, &'a E, &'a F, &'a G, &'a H, &'a I, &'a J, &'a K, &'a L) where C: ByteEncodable, D: ByteEncodable, E: ByteEncodable, F: ByteEncodable, G: ByteEncodable, H: ByteEncodable, I: ByteEncodable, J: ByteEncodable, K: ByteEncodable, L: ByteEncodable
impl<D, E, F, G, H, I, J, K, L> ByteEncodable for (D, E, F, G, H, I, J, K, L) where D: ByteEncodable, E: ByteEncodable, F: ByteEncodable, G: ByteEncodable, H: ByteEncodable, I: ByteEncodable, J: ByteEncodable, K: ByteEncodable, L: ByteEncodable
impl<'a, D, E, F, G, H, I, J, K, L> ByteEncodable for &'a (&'a D, &'a E, &'a F, &'a G, &'a H, &'a I, &'a J, &'a K, &'a L) where D: ByteEncodable, E: ByteEncodable, F: ByteEncodable, G: ByteEncodable, H: ByteEncodable, I: ByteEncodable, J: ByteEncodable, K: ByteEncodable, L: ByteEncodable
impl<E, F, G, H, I, J, K, L> ByteEncodable for (E, F, G, H, I, J, K, L) where E: ByteEncodable, F: ByteEncodable, G: ByteEncodable, H: ByteEncodable, I: ByteEncodable, J: ByteEncodable, K: ByteEncodable, L: ByteEncodable
impl<'a, E, F, G, H, I, J, K, L> ByteEncodable for &'a (&'a E, &'a F, &'a G, &'a H, &'a I, &'a J, &'a K, &'a L) where E: ByteEncodable, F: ByteEncodable, G: ByteEncodable, H: ByteEncodable, I: ByteEncodable, J: ByteEncodable, K: ByteEncodable, L: ByteEncodable
impl<F, G, H, I, J, K, L> ByteEncodable for (F, G, H, I, J, K, L) where F: ByteEncodable, G: ByteEncodable, H: ByteEncodable, I: ByteEncodable, J: ByteEncodable, K: ByteEncodable, L: ByteEncodable
impl<'a, F, G, H, I, J, K, L> ByteEncodable for &'a (&'a F, &'a G, &'a H, &'a I, &'a J, &'a K, &'a L) where F: ByteEncodable, G: ByteEncodable, H: ByteEncodable, I: ByteEncodable, J: ByteEncodable, K: ByteEncodable, L: ByteEncodable
impl<G, H, I, J, K, L> ByteEncodable for (G, H, I, J, K, L) where G: ByteEncodable, H: ByteEncodable, I: ByteEncodable, J: ByteEncodable, K: ByteEncodable, L: ByteEncodable
impl<'a, G, H, I, J, K, L> ByteEncodable for &'a (&'a G, &'a H, &'a I, &'a J, &'a K, &'a L) where G: ByteEncodable, H: ByteEncodable, I: ByteEncodable, J: ByteEncodable, K: ByteEncodable, L: ByteEncodable
impl<H, I, J, K, L> ByteEncodable for (H, I, J, K, L) where H: ByteEncodable, I: ByteEncodable, J: ByteEncodable, K: ByteEncodable, L: ByteEncodable
impl<'a, H, I, J, K, L> ByteEncodable for &'a (&'a H, &'a I, &'a J, &'a K, &'a L) where H: ByteEncodable, I: ByteEncodable, J: ByteEncodable, K: ByteEncodable, L: ByteEncodable
impl<I, J, K, L> ByteEncodable for (I, J, K, L) where I: ByteEncodable, J: ByteEncodable, K: ByteEncodable, L: ByteEncodable
impl<'a, I, J, K, L> ByteEncodable for &'a (&'a I, &'a J, &'a K, &'a L) where I: ByteEncodable, J: ByteEncodable, K: ByteEncodable, L: ByteEncodable
impl<J, K, L> ByteEncodable for (J, K, L) where J: ByteEncodable, K: ByteEncodable, L: ByteEncodable
impl<'a, J, K, L> ByteEncodable for &'a (&'a J, &'a K, &'a L) where J: ByteEncodable, K: ByteEncodable, L: ByteEncodable
impl<K, L> ByteEncodable for (K, L) where K: ByteEncodable, L: ByteEncodable
impl<'a, K, L> ByteEncodable for &'a (&'a K, &'a L) where K: ByteEncodable, L: ByteEncodable
impl<L> ByteEncodable for (L,) where L: ByteEncodable
impl<'a, L> ByteEncodable for &'a (&'a L,) where L: ByteEncodable
impl ByteEncodable for ()
impl ByteEncodable for u8
impl ByteEncodable for u16
impl ByteEncodable for u32
impl ByteEncodable for u64
impl ByteEncodable for i8
impl ByteEncodable for i16
impl ByteEncodable for i32
impl ByteEncodable for i64
impl ByteEncodable for f32
impl ByteEncodable for f64
impl ByteEncodable for char
impl ByteEncodable for usize