#[repr(C)]pub struct ecs_os_api_t {Show 40 fields
pub init_: Option<unsafe extern "C" fn()>,
pub fini_: Option<unsafe extern "C" fn()>,
pub malloc_: Option<unsafe extern "C" fn(i32) -> *mut c_void>,
pub realloc_: Option<unsafe extern "C" fn(*mut c_void, i32) -> *mut c_void>,
pub calloc_: Option<unsafe extern "C" fn(i32) -> *mut c_void>,
pub free_: Option<unsafe extern "C" fn(*mut c_void)>,
pub strdup_: Option<unsafe extern "C" fn(*const i8) -> *mut i8>,
pub thread_new_: Option<unsafe extern "C" fn(Option<unsafe extern "C" fn(*mut c_void) -> *mut c_void>, *mut c_void) -> usize>,
pub thread_join_: Option<unsafe extern "C" fn(usize) -> *mut c_void>,
pub thread_self_: Option<unsafe extern "C" fn() -> u64>,
pub task_new_: Option<unsafe extern "C" fn(Option<unsafe extern "C" fn(*mut c_void) -> *mut c_void>, *mut c_void) -> usize>,
pub task_join_: Option<unsafe extern "C" fn(usize) -> *mut c_void>,
pub ainc_: Option<unsafe extern "C" fn(*mut i32) -> i32>,
pub adec_: Option<unsafe extern "C" fn(*mut i32) -> i32>,
pub lainc_: Option<unsafe extern "C" fn(*mut i64) -> i64>,
pub ladec_: Option<unsafe extern "C" fn(*mut i64) -> i64>,
pub mutex_new_: Option<unsafe extern "C" fn() -> usize>,
pub mutex_free_: Option<unsafe extern "C" fn(usize)>,
pub mutex_lock_: Option<unsafe extern "C" fn(usize)>,
pub mutex_unlock_: Option<unsafe extern "C" fn(usize)>,
pub cond_new_: Option<unsafe extern "C" fn() -> usize>,
pub cond_free_: Option<unsafe extern "C" fn(usize)>,
pub cond_signal_: Option<unsafe extern "C" fn(usize)>,
pub cond_broadcast_: Option<unsafe extern "C" fn(usize)>,
pub cond_wait_: Option<unsafe extern "C" fn(usize, usize)>,
pub sleep_: Option<unsafe extern "C" fn(i32, i32)>,
pub now_: Option<unsafe extern "C" fn() -> u64>,
pub get_time_: Option<unsafe extern "C" fn(*mut ecs_time_t)>,
pub log_: Option<unsafe extern "C" fn(i32, *const i8, i32, *const i8)>,
pub abort_: Option<unsafe extern "C" fn()>,
pub dlopen_: Option<unsafe extern "C" fn(*const i8) -> usize>,
pub dlproc_: Option<unsafe extern "C" fn(usize, *const i8) -> Option<unsafe extern "C" fn()>>,
pub dlclose_: Option<unsafe extern "C" fn(usize)>,
pub module_to_dl_: Option<unsafe extern "C" fn(*const i8) -> *mut i8>,
pub module_to_etc_: Option<unsafe extern "C" fn(*const i8) -> *mut i8>,
pub log_level_: i32,
pub log_indent_: i32,
pub log_last_error_: i32,
pub log_last_timestamp_: i64,
pub flags_: u32,
}Expand description
Prefix members of struct with ‘ecs_’ as some system headers may define macros for functions like “strdup”, “log” or “_free”
Fields§
§init_: Option<unsafe extern "C" fn()>API init / deinit
fini_: Option<unsafe extern "C" fn()>§malloc_: Option<unsafe extern "C" fn(i32) -> *mut c_void>Memory management
realloc_: Option<unsafe extern "C" fn(*mut c_void, i32) -> *mut c_void>§calloc_: Option<unsafe extern "C" fn(i32) -> *mut c_void>§free_: Option<unsafe extern "C" fn(*mut c_void)>§strdup_: Option<unsafe extern "C" fn(*const i8) -> *mut i8>Strings
thread_new_: Option<unsafe extern "C" fn(Option<unsafe extern "C" fn(*mut c_void) -> *mut c_void>, *mut c_void) -> usize>Threads
thread_join_: Option<unsafe extern "C" fn(usize) -> *mut c_void>§thread_self_: Option<unsafe extern "C" fn() -> u64>§task_new_: Option<unsafe extern "C" fn(Option<unsafe extern "C" fn(*mut c_void) -> *mut c_void>, *mut c_void) -> usize>Tasks
task_join_: Option<unsafe extern "C" fn(usize) -> *mut c_void>§ainc_: Option<unsafe extern "C" fn(*mut i32) -> i32>Atomic incremenet / decrement
adec_: Option<unsafe extern "C" fn(*mut i32) -> i32>§lainc_: Option<unsafe extern "C" fn(*mut i64) -> i64>§ladec_: Option<unsafe extern "C" fn(*mut i64) -> i64>§mutex_new_: Option<unsafe extern "C" fn() -> usize>Mutex
mutex_free_: Option<unsafe extern "C" fn(usize)>§mutex_lock_: Option<unsafe extern "C" fn(usize)>§mutex_unlock_: Option<unsafe extern "C" fn(usize)>§cond_new_: Option<unsafe extern "C" fn() -> usize>Condition variable
cond_free_: Option<unsafe extern "C" fn(usize)>§cond_signal_: Option<unsafe extern "C" fn(usize)>§cond_broadcast_: Option<unsafe extern "C" fn(usize)>§cond_wait_: Option<unsafe extern "C" fn(usize, usize)>§sleep_: Option<unsafe extern "C" fn(i32, i32)>Time
now_: Option<unsafe extern "C" fn() -> u64>§get_time_: Option<unsafe extern "C" fn(*mut ecs_time_t)>§log_: Option<unsafe extern "C" fn(i32, *const i8, i32, *const i8)>Logging function. The level should be interpreted as: / / >0: Debug tracing. Only enabled in debug builds. / / 0: Tracing. Enabled in debug/release builds. / / -2: Warning. An issue occurred, but operation was successful. / / -3: Error. An issue occurred, and operation was unsuccessful. / / -4: Fatal. An issue occurred, and application must quit.
abort_: Option<unsafe extern "C" fn()>Application termination
dlopen_: Option<unsafe extern "C" fn(*const i8) -> usize>Dynamic library loading
dlproc_: Option<unsafe extern "C" fn(usize, *const i8) -> Option<unsafe extern "C" fn()>>§dlclose_: Option<unsafe extern "C" fn(usize)>§module_to_dl_: Option<unsafe extern "C" fn(*const i8) -> *mut i8>Overridable function that translates from a logical module id to a shared library filename
module_to_etc_: Option<unsafe extern "C" fn(*const i8) -> *mut i8>Overridable function that translates from a logical module id to a path that contains module-specif resources or assets
log_level_: i32Trace level
log_indent_: i32Trace indentation
log_last_error_: i32Last error code
log_last_timestamp_: i64Last recorded timestamp
flags_: u32OS API flags
Trait Implementations§
Source§impl Clone for ecs_os_api_t
impl Clone for ecs_os_api_t
Source§fn clone(&self) -> ecs_os_api_t
fn clone(&self) -> ecs_os_api_t
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more