Trait bytevec::ByteDecodable
[−]
[src]
pub trait ByteDecodable: Sized { fn decode<Size>(bytes: &[u8]) -> BVDecodeResult<Self>
where
Size: BVSize + ByteDecodable; fn decode_max<Size>(bytes: &[u8], limit: Size) -> BVDecodeResult<Self>
where
Size: BVSize + ByteDecodable, { ... } }
Provides deserialization functionality for the implementing types.
Required Methods
fn decode<Size>(bytes: &[u8]) -> BVDecodeResult<Self> where
Size: BVSize + ByteDecodable,
Size: BVSize + ByteDecodable,
Returns an instance of Self
obtained from the deserialization of the provided byte buffer.
Provided Methods
fn decode_max<Size>(bytes: &[u8], limit: Size) -> BVDecodeResult<Self> where
Size: BVSize + ByteDecodable,
Size: BVSize + ByteDecodable,
Returns the result of decode
if bytes.len()
is less or equal than limit
Implementors
impl ByteDecodable for String
impl<T> ByteDecodable for Vec<T> where
T: ByteDecodable,impl<T> ByteDecodable for HashSet<T> where
T: ByteDecodable + Eq + Hash,impl<K, V> ByteDecodable for HashMap<K, V> where
K: ByteDecodable + Hash + Eq,
V: ByteDecodable,impl<A, B, C, D, E, F, G, H, I, J, K, L> ByteDecodable for (A, B, C, D, E, F, G, H, I, J, K, L) where
A: ByteDecodable,
B: ByteDecodable,
C: ByteDecodable,
D: ByteDecodable,
E: ByteDecodable,
F: ByteDecodable,
G: ByteDecodable,
H: ByteDecodable,
I: ByteDecodable,
J: ByteDecodable,
K: ByteDecodable,
L: ByteDecodable,impl<B, C, D, E, F, G, H, I, J, K, L> ByteDecodable for (B, C, D, E, F, G, H, I, J, K, L) where
B: ByteDecodable,
C: ByteDecodable,
D: ByteDecodable,
E: ByteDecodable,
F: ByteDecodable,
G: ByteDecodable,
H: ByteDecodable,
I: ByteDecodable,
J: ByteDecodable,
K: ByteDecodable,
L: ByteDecodable,impl<C, D, E, F, G, H, I, J, K, L> ByteDecodable for (C, D, E, F, G, H, I, J, K, L) where
C: ByteDecodable,
D: ByteDecodable,
E: ByteDecodable,
F: ByteDecodable,
G: ByteDecodable,
H: ByteDecodable,
I: ByteDecodable,
J: ByteDecodable,
K: ByteDecodable,
L: ByteDecodable,impl<D, E, F, G, H, I, J, K, L> ByteDecodable for (D, E, F, G, H, I, J, K, L) where
D: ByteDecodable,
E: ByteDecodable,
F: ByteDecodable,
G: ByteDecodable,
H: ByteDecodable,
I: ByteDecodable,
J: ByteDecodable,
K: ByteDecodable,
L: ByteDecodable,impl<E, F, G, H, I, J, K, L> ByteDecodable for (E, F, G, H, I, J, K, L) where
E: ByteDecodable,
F: ByteDecodable,
G: ByteDecodable,
H: ByteDecodable,
I: ByteDecodable,
J: ByteDecodable,
K: ByteDecodable,
L: ByteDecodable,impl<F, G, H, I, J, K, L> ByteDecodable for (F, G, H, I, J, K, L) where
F: ByteDecodable,
G: ByteDecodable,
H: ByteDecodable,
I: ByteDecodable,
J: ByteDecodable,
K: ByteDecodable,
L: ByteDecodable,impl<G, H, I, J, K, L> ByteDecodable for (G, H, I, J, K, L) where
G: ByteDecodable,
H: ByteDecodable,
I: ByteDecodable,
J: ByteDecodable,
K: ByteDecodable,
L: ByteDecodable,impl<H, I, J, K, L> ByteDecodable for (H, I, J, K, L) where
H: ByteDecodable,
I: ByteDecodable,
J: ByteDecodable,
K: ByteDecodable,
L: ByteDecodable,impl<I, J, K, L> ByteDecodable for (I, J, K, L) where
I: ByteDecodable,
J: ByteDecodable,
K: ByteDecodable,
L: ByteDecodable,impl<J, K, L> ByteDecodable for (J, K, L) where
J: ByteDecodable,
K: ByteDecodable,
L: ByteDecodable,impl<K, L> ByteDecodable for (K, L) where
K: ByteDecodable,
L: ByteDecodable,impl<L> ByteDecodable for (L,) where
L: ByteDecodable,impl ByteDecodable for ()
impl ByteDecodable for u8
impl ByteDecodable for u16
impl ByteDecodable for u32
impl ByteDecodable for u64
impl ByteDecodable for i8
impl ByteDecodable for i16
impl ByteDecodable for i32
impl ByteDecodable for i64
impl ByteDecodable for f32
impl ByteDecodable for f64
impl ByteDecodable for char
impl ByteDecodable for usize