#[unsafe(no_mangle)]pub unsafe extern "C" fn pamoja_transport_faulty(
transport: *mut PamojaTransport,
failures: usize,
) -> *mut PamojaTransportExpand description
Wraps a transport so a set number of its next sends fail.
This is how a caller checks that a ladder falls through to its next rung, or that a buffer fills, without unplugging anything.
§Arguments
transport- the transport to wrap, consumed by this call.failures- how many upcoming sends to fail.
§Returns
A new handle owning the wrapped transport, or null if transport is null.
§Safety
transport must be a live handle that has not been freed or consumed. After
this call it must not be used again, whatever the result.