[−][src]Trait abxml::model::owned::OwnedBuf
Implementors are able to be converted to well formed chunks as expected on ChunkLoaderStream
Required methods
fn get_token(&self) -> u16
Token that identifies the current chunk
fn get_body_data(&self) -> Result<Vec<u8>, Error>
Return the bytes corresponding to chunk's body
Provided methods
fn get_header(&self) -> Result<Vec<u8>, Error>
Return the bytes corresponding to chunk's header
fn to_vec(&self) -> Result<Vec<u8>, Error>
Convert the given OwnedBuf
to a well formed chunk in form of vector of bytes
fn write_header(&self, buffer: &mut Vec<u8>, body: &[u8]) -> Result<(), Error>
Writes the header to the output buffer. It writes token, header size and chunk_size and
then the data returned by get_header
.