CustomEncoder

Trait CustomEncoder 

Source
pub trait CustomEncoder {
    // Required method
    fn encode<'a>(
        &self,
        elements: &'a [Element],
        class_def: &Option<ClassDefinition>,
        encoder: &AMF3Encoder,
    ) -> Vec<u8> ;
}
Expand description

A trait to define encoding for custom types for use with Externalized objects

Required Methods§

Source

fn encode<'a>( &self, elements: &'a [Element], class_def: &Option<ClassDefinition>, encoder: &AMF3Encoder, ) -> Vec<u8>

This should implement the encoding of a given set of external elements for the given class definition Access to the AMF3Encoder is given to allow access to caches This implements the encoding side of externalized type support

Implementors§