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