enough_token_create

Function enough_token_create 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn enough_token_create( source: *const FfiCancellationSource, ) -> *mut FfiCancellationToken
Expand description

Create a token from a cancellation source.

The token holds a reference to the shared state and must be destroyed with enough_token_destroy.

The token remains valid even after the source is destroyed.

§Safety

source must be a valid pointer returned by enough_cancellation_create, or null (which creates a “never cancelled” token).