#[no_mangle]
pub unsafe extern "C" fn router_execute(
router: &Router<'_>,
context: &mut Context<'_>,
) -> bool
Expand description
Execute the router with the context.
§Arguments
router
: a pointer to theRouter
object returned byrouter_new
.context
: a pointer to theContext
object.
§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 byrouter_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.