Skip to main content

Module test_helpers

Module test_helpers 

Source
Available on crate feature session and (crate features test-helpers) only.
Expand description

Parser stubs for downstream test crates. Gated by the test-helpers feature; not for production use. Parser stubs intended for downstream test crates that need a SessionParser / DatagramParser impl but don’t care about the produced messages.

Gated behind the test-helpers Cargo feature (alongside extract::parse::test_frames). Not for production use.

Future trait-shape evolution (new defaulted methods, signature tweaks) absorbs into these stubs once instead of forcing every downstream test crate to update its own copy.

Modules§

events
Synthetic event constructors for downstream test crates.

Structs§

EchoSessionParser
A SessionParser that echoes each fed chunk as a side-tagged Vec<u8> message. Use when test code wants to inspect the reassembled byte stream.
NoopDatagramParser
A DatagramParser that produces no messages. Mirror of NoopSessionParser.
NoopSessionParser
A SessionParser that produces no messages. Use when test code needs to exercise the driver / stream wiring without caring about parsed output.
OneShotDatagramParser
Datagram mirror of OneShotSessionParser.
OneShotSessionParser
A SessionParser that emits one empty message on the first feed_initiator call and reports is_done() == true thereafter. Use for testing the plan-80 crate::SessionParser::is_done / crate::EndReason::ParserDone wiring.