#[unsafe(no_mangle)]pub unsafe extern "C" fn moq_error_protocol(
out: *mut moq_protocol_error,
) -> i32Expand description
Structured protocol details for the most recent failed call on the calling thread.
When that failure was a session close or stream reset, writes the scope, verbatim
wire code, and recognized kind into out and returns 0. Returns a negative code
(and leaves out untouched) when the last error was not a protocol failure
(transport, not-found, a bad handle, …). Do not parse moq_error for this.
The values are only meaningful after a call returned a negative code; check the code first. Same lifetime as moq_error: overwritten by the next libmoq call on this thread. Errors delivered through status callbacks are recorded before the callback runs, so read this from inside the callback.
§Safety
- The caller must ensure that
outis a valid pointer to a moq_protocol_error.