Skip to main content

Encoding

Trait Encoding 

Source
pub trait Encoding
where Self: Send,
{ // Required methods fn get_type(&self) -> EncodingType; fn encode(&self) -> &Vec<u8> ; fn transform( &self, input: &PixelFormat, output: &PixelFormat, ) -> Box<dyn Encoding>; }

Required Methods§

Source

fn get_type(&self) -> EncodingType

Source

fn encode(&self) -> &Vec<u8>

Transform this encoding from its representation into a byte vector that can be passed to the client.

Source

fn transform( &self, input: &PixelFormat, output: &PixelFormat, ) -> Box<dyn Encoding>

Translates this encoding type from an input pixel format to an output format.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§