LargeBlobService

Trait LargeBlobService 

Source
pub trait LargeBlobService {
    // Required methods
    async fn echo(&self, data: Vec<u8>) -> Vec<u8> ;
    async fn xor_transform(&self, data: Vec<u8>, pattern: u8) -> Vec<u8> ;
    async fn checksum(&self, data: Vec<u8>) -> (u32, u32);
}
Expand description

Service that processes large byte payloads.

This service is used to test that large payloads (e.g., images, documents) are correctly transmitted across all transports. For SHM transport, this also enables testing the zero-copy path.

Required Methods§

Source

async fn echo(&self, data: Vec<u8>) -> Vec<u8>

Echo the blob back unchanged. Used to verify round-trip integrity of large payloads.

Source

async fn xor_transform(&self, data: Vec<u8>, pattern: u8) -> Vec<u8>

Transform the blob by XORing each byte with a pattern. Used to verify the server actually processes the data.

Source

async fn checksum(&self, data: Vec<u8>) -> (u32, u32)

Compute a simple checksum of the blob. Returns (length, sum of all bytes mod 2^32).

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§