Skip to main content

baseRT_token_callback

Type Alias baseRT_token_callback 

Source
pub type baseRT_token_callback = Option<unsafe extern "C" fn(token_id: u32, text: *const c_char, user_data: *mut c_void) -> bool>;
Expand description

Callback for streaming token output. Return false to stop generation.

Aliased Type§

pub enum baseRT_token_callback {
    None,
    Some(unsafe extern "C" fn(u32, *const i8, *mut c_void) -> bool),
}

Variants§

§1.0.0

None

No value.

§1.0.0

Some(unsafe extern "C" fn(u32, *const i8, *mut c_void) -> bool)

Some value of type T.