pub trait Encoding {
// Required method
fn encode(
&self,
data: &[u8],
width: u16,
height: u16,
quality: u8,
compression: u8,
) -> BytesMut;
}Expand description
Trait defining the interface for RFB encoding implementations.
Required Methods§
Sourcefn encode(
&self,
data: &[u8],
width: u16,
height: u16,
quality: u8,
compression: u8,
) -> BytesMut
fn encode( &self, data: &[u8], width: u16, height: u16, quality: u8, compression: u8, ) -> BytesMut
Encodes raw pixel data into RFB-compatible byte stream.
§Arguments
data- Raw pixel data (RGBA format: 4 bytes per pixel)width- Width of the framebufferheight- Height of the framebufferquality- Quality level for lossy encodings (0-100)compression- Compression level (0-9)
§Returns
Encoded data as BytesMut