Struct byondapi_sys::ByondApi
source · pub struct ByondApi {Show 48 fields
pub Byond_LastError: unsafe extern "C" fn() -> *const c_char,
pub Byond_GetVersion: unsafe extern "C" fn(version: *mut u4c, build: *mut u4c),
pub ByondValue_Init: unsafe extern "C" fn(v: *mut CByondValue),
pub ByondValue_InitNum: unsafe extern "C" fn(v: *mut CByondValue, num: f32),
pub ByondValue_InitStr: unsafe extern "C" fn(v: *mut CByondValue, str_: *const c_char) -> bool,
pub ByondValue_InitRef: unsafe extern "C" fn(v: *mut CByondValue, type_: ByondValueType, ref_: u4c),
pub ByondValue_Free: unsafe extern "C" fn(v: *mut CByondValue),
pub ByondValue_CopyFrom: unsafe extern "C" fn(dst: *mut CByondValue, src: *const CByondValue),
pub ByondValue_MoveFrom: unsafe extern "C" fn(dst: *mut CByondValue, src: *mut CByondValue),
pub ByondValue_Type: unsafe extern "C" fn(v: *const CByondValue) -> ByondValueType,
pub ByondValue_IsNull: unsafe extern "C" fn(v: *const CByondValue) -> bool,
pub ByondValue_IsNum: unsafe extern "C" fn(v: *const CByondValue) -> bool,
pub ByondValue_IsStr: unsafe extern "C" fn(v: *const CByondValue) -> bool,
pub ByondValue_IsList: unsafe extern "C" fn(v: *const CByondValue) -> bool,
pub ByondValue_GetNum: unsafe extern "C" fn(v: *const CByondValue) -> f32,
pub ByondValue_GetStr: unsafe extern "C" fn(v: *const CByondValue) -> *const c_char,
pub ByondValue_GetRef: unsafe extern "C" fn(v: *const CByondValue) -> u4c,
pub ByondValue_SetNum: unsafe extern "C" fn(v: *mut CByondValue, f: f32),
pub ByondValue_SetStr: unsafe extern "C" fn(v: *mut CByondValue, str_: *const c_char) -> bool,
pub ByondValue_SetRef: unsafe extern "C" fn(v: *mut CByondValue, type_: ByondValueType, ref_: u4c),
pub ByondValue_Equals: unsafe extern "C" fn(a: *const CByondValue, b: *const CByondValue) -> bool,
pub ByondValueList_Init: unsafe extern "C" fn(list: *mut CByondValueList),
pub ByondValueList_InitCount: unsafe extern "C" fn(list: *mut CByondValueList, count: u4c) -> bool,
pub ByondValueList_Free: unsafe extern "C" fn(list: *mut CByondValueList),
pub ByondValueList_CopyFrom: unsafe extern "C" fn(dst: *mut CByondValueList, src: *const CByondValueList) -> bool,
pub ByondValueList_MoveFrom: unsafe extern "C" fn(dst: *mut CByondValueList, src: *mut CByondValueList),
pub ByondValueList_SetCount: unsafe extern "C" fn(list: *mut CByondValueList, count: u4c) -> bool,
pub ByondValueList_Add: unsafe extern "C" fn(list: *mut CByondValueList, v: *const CByondValue) -> bool,
pub ByondValueList_InsertAt: unsafe extern "C" fn(list: *mut CByondValueList, idx: c_int, v: *const CByondValue) -> bool,
pub ByondValueList_Splice: unsafe extern "C" fn(list: *mut CByondValueList, idx: c_int, delete_count: u4c, v: *const CByondValue, insert_count: u4c) -> bool,
pub ByondValueList_RemoveAt: unsafe extern "C" fn(list: *mut CByondValueList, idx: u4c, n: u4c) -> u4c,
pub Byond_GetStrId: unsafe extern "C" fn(str_: *const c_char) -> u4c,
pub Byond_ReadVar: unsafe extern "C" fn(loc: *const CByondValue, varname: *const c_char, result: *mut CByondValue) -> bool,
pub Byond_ReadVarByStrId: unsafe extern "C" fn(loc: *const CByondValue, varname: u4c, result: *mut CByondValue) -> bool,
pub Byond_WriteVar: unsafe extern "C" fn(loc: *const CByondValue, varname: *const c_char, val: *const CByondValue) -> bool,
pub Byond_WriteVarByStrId: unsafe extern "C" fn(loc: *const CByondValue, varname: u4c, val: *const CByondValue) -> bool,
pub Byond_CreateList: unsafe extern "C" fn(result: *mut CByondValue) -> bool,
pub Byond_ReadList: unsafe extern "C" fn(loc: *const CByondValue, list: *mut CByondValueList) -> bool,
pub Byond_WriteList: unsafe extern "C" fn(loc: *const CByondValue, list: *const CByondValueList) -> bool,
pub Byond_ReadListIndex: unsafe extern "C" fn(loc: *const CByondValue, idx: *const CByondValue, result: *mut CByondValue) -> bool,
pub Byond_WriteListIndex: unsafe extern "C" fn(loc: *const CByondValue, idx: *const CByondValue, val: *const CByondValue) -> bool,
pub Byond_ReadPointer: unsafe extern "C" fn(ptr: *const CByondValue, result: *mut CByondValue) -> bool,
pub Byond_WritePointer: unsafe extern "C" fn(ptr: *const CByondValue, val: *const CByondValue) -> bool,
pub Byond_CallProc: unsafe extern "C" fn(src: *const CByondValue, name: *const c_char, arg: *const CByondValue, arg_count: u4c, result: *mut CByondValue) -> bool,
pub Byond_CallProcByStrId: unsafe extern "C" fn(src: *const CByondValue, name: u4c, arg: *const CByondValue, arg_count: u4c, result: *mut CByondValue) -> bool,
pub ByondValue_IncRef: unsafe extern "C" fn(src: *const CByondValue),
pub ByondValue_DecRef: unsafe extern "C" fn(src: *const CByondValue),
pub Byond_TestRef: unsafe extern "C" fn(src: *mut CByondValue) -> bool,
/* private fields */
}
Fields§
§Byond_LastError: unsafe extern "C" fn() -> *const c_char
§Byond_GetVersion: unsafe extern "C" fn(version: *mut u4c, build: *mut u4c)
§ByondValue_Init: unsafe extern "C" fn(v: *mut CByondValue)
§ByondValue_InitNum: unsafe extern "C" fn(v: *mut CByondValue, num: f32)
§ByondValue_InitStr: unsafe extern "C" fn(v: *mut CByondValue, str_: *const c_char) -> bool
§ByondValue_InitRef: unsafe extern "C" fn(v: *mut CByondValue, type_: ByondValueType, ref_: u4c)
§ByondValue_Free: unsafe extern "C" fn(v: *mut CByondValue)
§ByondValue_CopyFrom: unsafe extern "C" fn(dst: *mut CByondValue, src: *const CByondValue)
§ByondValue_MoveFrom: unsafe extern "C" fn(dst: *mut CByondValue, src: *mut CByondValue)
§ByondValue_Type: unsafe extern "C" fn(v: *const CByondValue) -> ByondValueType
§ByondValue_IsNull: unsafe extern "C" fn(v: *const CByondValue) -> bool
§ByondValue_IsNum: unsafe extern "C" fn(v: *const CByondValue) -> bool
§ByondValue_IsStr: unsafe extern "C" fn(v: *const CByondValue) -> bool
§ByondValue_IsList: unsafe extern "C" fn(v: *const CByondValue) -> bool
§ByondValue_GetNum: unsafe extern "C" fn(v: *const CByondValue) -> f32
§ByondValue_GetStr: unsafe extern "C" fn(v: *const CByondValue) -> *const c_char
§ByondValue_GetRef: unsafe extern "C" fn(v: *const CByondValue) -> u4c
§ByondValue_SetNum: unsafe extern "C" fn(v: *mut CByondValue, f: f32)
§ByondValue_SetStr: unsafe extern "C" fn(v: *mut CByondValue, str_: *const c_char) -> bool
§ByondValue_SetRef: unsafe extern "C" fn(v: *mut CByondValue, type_: ByondValueType, ref_: u4c)
§ByondValue_Equals: unsafe extern "C" fn(a: *const CByondValue, b: *const CByondValue) -> bool
§ByondValueList_Init: unsafe extern "C" fn(list: *mut CByondValueList)
§ByondValueList_InitCount: unsafe extern "C" fn(list: *mut CByondValueList, count: u4c) -> bool
§ByondValueList_Free: unsafe extern "C" fn(list: *mut CByondValueList)
§ByondValueList_CopyFrom: unsafe extern "C" fn(dst: *mut CByondValueList, src: *const CByondValueList) -> bool
§ByondValueList_MoveFrom: unsafe extern "C" fn(dst: *mut CByondValueList, src: *mut CByondValueList)
§ByondValueList_SetCount: unsafe extern "C" fn(list: *mut CByondValueList, count: u4c) -> bool
§ByondValueList_Add: unsafe extern "C" fn(list: *mut CByondValueList, v: *const CByondValue) -> bool
§ByondValueList_InsertAt: unsafe extern "C" fn(list: *mut CByondValueList, idx: c_int, v: *const CByondValue) -> bool
§ByondValueList_Splice: unsafe extern "C" fn(list: *mut CByondValueList, idx: c_int, delete_count: u4c, v: *const CByondValue, insert_count: u4c) -> bool
§ByondValueList_RemoveAt: unsafe extern "C" fn(list: *mut CByondValueList, idx: u4c, n: u4c) -> u4c
§Byond_GetStrId: unsafe extern "C" fn(str_: *const c_char) -> u4c
§Byond_ReadVar: unsafe extern "C" fn(loc: *const CByondValue, varname: *const c_char, result: *mut CByondValue) -> bool
§Byond_ReadVarByStrId: unsafe extern "C" fn(loc: *const CByondValue, varname: u4c, result: *mut CByondValue) -> bool
§Byond_WriteVar: unsafe extern "C" fn(loc: *const CByondValue, varname: *const c_char, val: *const CByondValue) -> bool
§Byond_WriteVarByStrId: unsafe extern "C" fn(loc: *const CByondValue, varname: u4c, val: *const CByondValue) -> bool
§Byond_CreateList: unsafe extern "C" fn(result: *mut CByondValue) -> bool
§Byond_ReadList: unsafe extern "C" fn(loc: *const CByondValue, list: *mut CByondValueList) -> bool
§Byond_WriteList: unsafe extern "C" fn(loc: *const CByondValue, list: *const CByondValueList) -> bool
§Byond_ReadListIndex: unsafe extern "C" fn(loc: *const CByondValue, idx: *const CByondValue, result: *mut CByondValue) -> bool
§Byond_WriteListIndex: unsafe extern "C" fn(loc: *const CByondValue, idx: *const CByondValue, val: *const CByondValue) -> bool
§Byond_ReadPointer: unsafe extern "C" fn(ptr: *const CByondValue, result: *mut CByondValue) -> bool
§Byond_WritePointer: unsafe extern "C" fn(ptr: *const CByondValue, val: *const CByondValue) -> bool
§Byond_CallProc: unsafe extern "C" fn(src: *const CByondValue, name: *const c_char, arg: *const CByondValue, arg_count: u4c, result: *mut CByondValue) -> bool
§Byond_CallProcByStrId: unsafe extern "C" fn(src: *const CByondValue, name: u4c, arg: *const CByondValue, arg_count: u4c, result: *mut CByondValue) -> bool
§ByondValue_IncRef: unsafe extern "C" fn(src: *const CByondValue)
§ByondValue_DecRef: unsafe extern "C" fn(src: *const CByondValue)
§Byond_TestRef: unsafe extern "C" fn(src: *mut CByondValue) -> bool
Implementations§
source§impl ByondApi
impl ByondApi
pub unsafe fn new<P>(path: P) -> Result<Self, Error>where P: AsRef<OsStr>,
pub unsafe fn from_library<L>(library: L) -> Result<Self, Error>where L: Into<Library>,
pub unsafe fn Byond_LastError(&self) -> *const c_char
pub unsafe fn Byond_GetVersion(&self, version: *mut u4c, build: *mut u4c)
pub unsafe fn ByondValue_Init(&self, v: *mut CByondValue)
pub unsafe fn ByondValue_InitNum(&self, v: *mut CByondValue, num: f32)
pub unsafe fn ByondValue_InitStr( &self, v: *mut CByondValue, str_: *const c_char ) -> bool
pub unsafe fn ByondValue_InitRef( &self, v: *mut CByondValue, type_: ByondValueType, ref_: u4c )
pub unsafe fn ByondValue_Free(&self, v: *mut CByondValue)
pub unsafe fn ByondValue_CopyFrom( &self, dst: *mut CByondValue, src: *const CByondValue )
pub unsafe fn ByondValue_MoveFrom( &self, dst: *mut CByondValue, src: *mut CByondValue )
pub unsafe fn ByondValue_Type(&self, v: *const CByondValue) -> ByondValueType
pub unsafe fn ByondValue_IsNull(&self, v: *const CByondValue) -> bool
pub unsafe fn ByondValue_IsNum(&self, v: *const CByondValue) -> bool
pub unsafe fn ByondValue_IsStr(&self, v: *const CByondValue) -> bool
pub unsafe fn ByondValue_IsList(&self, v: *const CByondValue) -> bool
pub unsafe fn ByondValue_GetNum(&self, v: *const CByondValue) -> f32
pub unsafe fn ByondValue_GetStr(&self, v: *const CByondValue) -> *const c_char
pub unsafe fn ByondValue_GetRef(&self, v: *const CByondValue) -> u4c
pub unsafe fn ByondValue_SetNum(&self, v: *mut CByondValue, f: f32)
pub unsafe fn ByondValue_SetStr( &self, v: *mut CByondValue, str_: *const c_char ) -> bool
pub unsafe fn ByondValue_SetRef( &self, v: *mut CByondValue, type_: ByondValueType, ref_: u4c )
pub unsafe fn ByondValue_Equals( &self, a: *const CByondValue, b: *const CByondValue ) -> bool
pub unsafe fn ByondValueList_Init(&self, list: *mut CByondValueList)
pub unsafe fn ByondValueList_InitCount( &self, list: *mut CByondValueList, count: u4c ) -> bool
pub unsafe fn ByondValueList_Free(&self, list: *mut CByondValueList)
pub unsafe fn ByondValueList_CopyFrom( &self, dst: *mut CByondValueList, src: *const CByondValueList ) -> bool
pub unsafe fn ByondValueList_MoveFrom( &self, dst: *mut CByondValueList, src: *mut CByondValueList )
pub unsafe fn ByondValueList_SetCount( &self, list: *mut CByondValueList, count: u4c ) -> bool
pub unsafe fn ByondValueList_Add( &self, list: *mut CByondValueList, v: *const CByondValue ) -> bool
pub unsafe fn ByondValueList_InsertAt( &self, list: *mut CByondValueList, idx: c_int, v: *const CByondValue ) -> bool
pub unsafe fn ByondValueList_Splice( &self, list: *mut CByondValueList, idx: c_int, delete_count: u4c, v: *const CByondValue, insert_count: u4c ) -> bool
pub unsafe fn ByondValueList_RemoveAt( &self, list: *mut CByondValueList, idx: u4c, n: u4c ) -> u4c
pub unsafe fn Byond_GetStrId(&self, str_: *const c_char) -> u4c
pub unsafe fn Byond_ReadVar( &self, loc: *const CByondValue, varname: *const c_char, result: *mut CByondValue ) -> bool
pub unsafe fn Byond_ReadVarByStrId( &self, loc: *const CByondValue, varname: u4c, result: *mut CByondValue ) -> bool
pub unsafe fn Byond_WriteVar( &self, loc: *const CByondValue, varname: *const c_char, val: *const CByondValue ) -> bool
pub unsafe fn Byond_WriteVarByStrId( &self, loc: *const CByondValue, varname: u4c, val: *const CByondValue ) -> bool
pub unsafe fn Byond_CreateList(&self, result: *mut CByondValue) -> bool
pub unsafe fn Byond_ReadList( &self, loc: *const CByondValue, list: *mut CByondValueList ) -> bool
pub unsafe fn Byond_WriteList( &self, loc: *const CByondValue, list: *const CByondValueList ) -> bool
pub unsafe fn Byond_ReadListIndex( &self, loc: *const CByondValue, idx: *const CByondValue, result: *mut CByondValue ) -> bool
pub unsafe fn Byond_WriteListIndex( &self, loc: *const CByondValue, idx: *const CByondValue, val: *const CByondValue ) -> bool
pub unsafe fn Byond_ReadPointer( &self, ptr: *const CByondValue, result: *mut CByondValue ) -> bool
pub unsafe fn Byond_WritePointer( &self, ptr: *const CByondValue, val: *const CByondValue ) -> bool
pub unsafe fn Byond_CallProc( &self, src: *const CByondValue, name: *const c_char, arg: *const CByondValue, arg_count: u4c, result: *mut CByondValue ) -> bool
pub unsafe fn Byond_CallProcByStrId( &self, src: *const CByondValue, name: u4c, arg: *const CByondValue, arg_count: u4c, result: *mut CByondValue ) -> bool
pub unsafe fn ByondValue_IncRef(&self, src: *const CByondValue)
pub unsafe fn ByondValue_DecRef(&self, src: *const CByondValue)
pub unsafe fn Byond_TestRef(&self, src: *mut CByondValue) -> bool
Auto Trait Implementations§
impl RefUnwindSafe for ByondApi
impl Send for ByondApi
impl Sync for ByondApi
impl Unpin for ByondApi
impl UnwindSafe for ByondApi
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more