Skip to main content

drive_with_codec_frames

Function drive_with_codec_frames 

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

Drive app with payloads and return decoded response frames.

Unlike the payload-level drivers, this variant returns the full codec frames so tests can inspect frame-level metadata such as transaction identifiers or sequence numbers.

ยงErrors

Returns any I/O or codec error encountered during encoding, transport, or decoding.

let codec = HotlineFrameCodec::new(4096);
let app = WireframeApp::new().expect("app").with_codec(codec.clone());
let frames = drive_with_codec_frames(app, &codec, vec![vec![1]]).await?;