atc_router::ffi::router

Function router_execute

Source
#[no_mangle]
pub unsafe extern "C" fn router_execute(
    router: &Router<'_>,
    context: &mut Context<'_>,
) -> bool
Expand description

Execute the router with the context.

§Arguments

§Returns

Returns true if found a match, false means no match found.

§Safety

Violating any of the following constraints will result in undefined behavior:

  • router must be a valid pointer returned by router_new.
  • context must be a valid pointer returned by [context_new], and must be reset by [context_reset] before calling this function if you want to reuse the same context for multiple matches.