Skip to main content

drive_with_payloads

Function drive_with_payloads 

Source
pub async fn drive_with_payloads<S, C, E>(
    app: WireframeApp<S, C, E>,
    payloads: Vec<Vec<u8>>,
) -> Result<Vec<u8>>
where S: TestSerializer, C: Send + 'static, E: Packet,
Expand description

Encode payloads as length-delimited frames and drive app.

This helper wraps each payload using the default length-delimited framing format before sending it to the application.

let app = WireframeApp::new().expect("failed to initialize app");
let out = drive_with_payloads(app, vec![vec![1], vec![2]]).await?;