[][src]Trait abxml::model::owned::OwnedBuf

pub trait OwnedBuf: Debug {
    fn get_token(&self) -> u16;
fn get_body_data(&self) -> Result<Vec<u8>, Error>; fn get_header(&self) -> Result<Vec<u8>, Error> { ... }
fn to_vec(&self) -> Result<Vec<u8>, Error> { ... }
fn write_header(
        &self,
        buffer: &mut Vec<u8>,
        body: &[u8]
    ) -> Result<(), Error> { ... } }

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

Loading content...

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.

Loading content...

Implementors

impl OwnedBuf for PackageBuf[src]

impl OwnedBuf for ResourcesBuf[src]

impl OwnedBuf for StringTableBuf[src]

impl OwnedBuf for TableTypeBuf[src]

impl OwnedBuf for TableTypeSpecBuf[src]

impl OwnedBuf for XmlNamespaceEndBuf[src]

impl OwnedBuf for XmlNamespaceStartBuf[src]

impl OwnedBuf for XmlTagEndBuf[src]

impl OwnedBuf for XmlTagStartBuf[src]

Loading content...