Skip to main content

moq_backends

Function moq_backends 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn moq_backends( dst: *mut moq_string, count: usize, ) -> i32
Expand description

List the QUIC backends this build was compiled with.

Writes up to count names into dst and returns the total number available, which may be larger than count. Pass a NULL dst with a zero count to size the array first. Each name borrows a static string valid for the life of the process.

The backends are compile-time optional, so a caller building a menu must read this rather than listing names: an option this build lacks is rejected by moq_client_set_backend, which would leave a menu entry that can only fail.

Returns the total count on success, or a negative code on failure.

ยงSafety

  • The caller must ensure that dst is either NULL with a zero count, or a valid pointer to count writable moq_string values.