Struct TheTruthAssetsApi

Source
#[repr(C)]
pub struct TheTruthAssetsApi {
Show 28 fields pub get_asset_path: Option<unsafe extern "C" fn(tt: *const TheTruthO, asset: TtIdT, path: *mut c_char, n: u32) -> u32>, pub get_directory_path: Option<unsafe extern "C" fn(tt: *const TheTruthO, directory: TtIdT, path: *mut c_char, n: u32) -> u32>, pub get_asset_path_with_extension: Option<unsafe extern "C" fn(tt: *const TheTruthO, asset: TtIdT, path: *mut c_char, n: u32) -> u32>, pub asset_from_path: Option<unsafe extern "C" fn(tt: *const TheTruthO, asset_root: TtIdT, path: *const c_char) -> TtIdT>, pub asset_from_path_with_type: Option<unsafe extern "C" fn(tt: *const TheTruthO, asset_root: TtIdT, path: *const c_char, type_: TtTypeT) -> TtIdT>, pub asset_object_from_path: Option<unsafe extern "C" fn(tt: *const TheTruthO, asset_root: TtIdT, path: *const c_char) -> TtIdT>, pub asset_object_from_path_with_type: Option<unsafe extern "C" fn(tt: *const TheTruthO, asset_root: TtIdT, path: *const c_char, type_: TtTypeT) -> TtIdT>, pub directory_from_path: Option<unsafe extern "C" fn(tt: *const TheTruthO, asset_root: TtIdT, path: *const c_char) -> TtIdT>, pub find_subdirectory_by_name: Option<unsafe extern "C" fn(tt: *const TheTruthO, asset_root: TtIdT, parent_dir: TtIdT, subdir_name: *const c_char) -> TtIdT>, pub unique_asset_name: Option<unsafe extern "C" fn(tt: *mut TheTruthO, asset_root: TtIdT, asset_r: *const TheTruthObjectO, desired_name: *const c_char) -> *const c_char>, pub unique_directory_name: Option<unsafe extern "C" fn(tt: *mut TheTruthO, asset_root: TtIdT, directory_r: *const TheTruthObjectO, desired_name: *const c_char) -> *const c_char>, pub object_asset_name: Option<unsafe extern "C" fn(tt: *mut TheTruthO, object: TtIdT) -> *const c_char>, pub find_directory_settings: Option<unsafe extern "C" fn(tt: *mut TheTruthO, relative_to: TtIdT, target_type_hash: StrhashT, asset_root: TtIdT) -> TtIdT>, pub object_to_config: Option<unsafe extern "C" fn(tt: *const TheTruthO, object: TtIdT, config: *mut ConfigI, buffers: *mut *mut TtAssetsBufferWriteT, buffers_ta: *mut TempAllocatorI, save_uuid: bool)>, pub create_object_from_config: Option<unsafe extern "C" fn(tt: *mut TheTruthO, config: *mut ConfigI, buffers: *mut *mut TtAssetsBufferT, buffers_ta: *mut TempAllocatorI) -> TtIdT>, pub read_object_from_config: Option<unsafe extern "C" fn(tt: *mut TheTruthO, config: *mut ConfigI, buffers: *mut *mut TtAssetsBufferT, buffers_ta: *mut TempAllocatorI, id: TtIdT)>, pub save_to_directory: Option<unsafe extern "C" fn(tt: *mut TheTruthO, asset_root: TtIdT, dir: *const c_char, ignore: *mut TtIdT, num_ignore: u32, old_std: *mut SavedTruthDataO, allocator: *mut AllocatorI) -> *mut SavedTruthDataO>, pub load_from_directory: Option<unsafe extern "C" fn(tt: *mut TheTruthO, dir: *const c_char, allocator: *mut AllocatorI, asset_root: *mut TtIdT, error: *mut ErrorI) -> *mut SavedTruthDataO>, pub current_truth_data: Option<unsafe extern "C" fn(tt: *mut TheTruthO, asset_root: TtIdT, allocator: *mut AllocatorI) -> *mut SavedTruthDataO>, pub revert_asset: Option<unsafe extern "C" fn(sd: *mut SavedTruthDataO, asset: TtIdT, undo_scope: TtUndoScopeT) -> bool>, pub save_asset: Option<unsafe extern "C" fn(sd: *mut SavedTruthDataO, asset: TtIdT) -> bool>, pub saved_name: Option<unsafe extern "C" fn(sd: *mut SavedTruthDataO, item: TtIdT) -> *const c_char>, pub saved_directory: Option<unsafe extern "C" fn(sd: *mut SavedTruthDataO, item: TtIdT) -> TtIdT>, pub saved_version: Option<unsafe extern "C" fn(sd: *mut SavedTruthDataO, item: TtIdT) -> u64>, pub all_saved_items: Option<unsafe extern "C" fn(sd: *mut SavedTruthDataO, ta: *mut TempAllocatorI) -> *mut TtIdT>, pub free_saved_data: Option<unsafe extern "C" fn(sd: *mut SavedTruthDataO)>, pub set_mock_file_system: Option<unsafe extern "C" fn(fs: *mut OsFileSystemApi, file_io: *mut OsFileIoApi)>, pub any_disk_changes: Option<unsafe extern "C" fn(sd: *mut SavedTruthDataO, dir: *const c_char) -> bool>,
}

Fields§

§get_asset_path: Option<unsafe extern "C" fn(tt: *const TheTruthO, asset: TtIdT, path: *mut c_char, n: u32) -> u32>§get_directory_path: Option<unsafe extern "C" fn(tt: *const TheTruthO, directory: TtIdT, path: *mut c_char, n: u32) -> u32>§get_asset_path_with_extension: Option<unsafe extern "C" fn(tt: *const TheTruthO, asset: TtIdT, path: *mut c_char, n: u32) -> u32>§asset_from_path: Option<unsafe extern "C" fn(tt: *const TheTruthO, asset_root: TtIdT, path: *const c_char) -> TtIdT>§asset_from_path_with_type: Option<unsafe extern "C" fn(tt: *const TheTruthO, asset_root: TtIdT, path: *const c_char, type_: TtTypeT) -> TtIdT>§asset_object_from_path: Option<unsafe extern "C" fn(tt: *const TheTruthO, asset_root: TtIdT, path: *const c_char) -> TtIdT>§asset_object_from_path_with_type: Option<unsafe extern "C" fn(tt: *const TheTruthO, asset_root: TtIdT, path: *const c_char, type_: TtTypeT) -> TtIdT>§directory_from_path: Option<unsafe extern "C" fn(tt: *const TheTruthO, asset_root: TtIdT, path: *const c_char) -> TtIdT>§find_subdirectory_by_name: Option<unsafe extern "C" fn(tt: *const TheTruthO, asset_root: TtIdT, parent_dir: TtIdT, subdir_name: *const c_char) -> TtIdT>§unique_asset_name: Option<unsafe extern "C" fn(tt: *mut TheTruthO, asset_root: TtIdT, asset_r: *const TheTruthObjectO, desired_name: *const c_char) -> *const c_char>§unique_directory_name: Option<unsafe extern "C" fn(tt: *mut TheTruthO, asset_root: TtIdT, directory_r: *const TheTruthObjectO, desired_name: *const c_char) -> *const c_char>§object_asset_name: Option<unsafe extern "C" fn(tt: *mut TheTruthO, object: TtIdT) -> *const c_char>§find_directory_settings: Option<unsafe extern "C" fn(tt: *mut TheTruthO, relative_to: TtIdT, target_type_hash: StrhashT, asset_root: TtIdT) -> TtIdT>§object_to_config: Option<unsafe extern "C" fn(tt: *const TheTruthO, object: TtIdT, config: *mut ConfigI, buffers: *mut *mut TtAssetsBufferWriteT, buffers_ta: *mut TempAllocatorI, save_uuid: bool)>§create_object_from_config: Option<unsafe extern "C" fn(tt: *mut TheTruthO, config: *mut ConfigI, buffers: *mut *mut TtAssetsBufferT, buffers_ta: *mut TempAllocatorI) -> TtIdT>§read_object_from_config: Option<unsafe extern "C" fn(tt: *mut TheTruthO, config: *mut ConfigI, buffers: *mut *mut TtAssetsBufferT, buffers_ta: *mut TempAllocatorI, id: TtIdT)>§save_to_directory: Option<unsafe extern "C" fn(tt: *mut TheTruthO, asset_root: TtIdT, dir: *const c_char, ignore: *mut TtIdT, num_ignore: u32, old_std: *mut SavedTruthDataO, allocator: *mut AllocatorI) -> *mut SavedTruthDataO>§load_from_directory: Option<unsafe extern "C" fn(tt: *mut TheTruthO, dir: *const c_char, allocator: *mut AllocatorI, asset_root: *mut TtIdT, error: *mut ErrorI) -> *mut SavedTruthDataO>§current_truth_data: Option<unsafe extern "C" fn(tt: *mut TheTruthO, asset_root: TtIdT, allocator: *mut AllocatorI) -> *mut SavedTruthDataO>§revert_asset: Option<unsafe extern "C" fn(sd: *mut SavedTruthDataO, asset: TtIdT, undo_scope: TtUndoScopeT) -> bool>§save_asset: Option<unsafe extern "C" fn(sd: *mut SavedTruthDataO, asset: TtIdT) -> bool>§saved_name: Option<unsafe extern "C" fn(sd: *mut SavedTruthDataO, item: TtIdT) -> *const c_char>§saved_directory: Option<unsafe extern "C" fn(sd: *mut SavedTruthDataO, item: TtIdT) -> TtIdT>§saved_version: Option<unsafe extern "C" fn(sd: *mut SavedTruthDataO, item: TtIdT) -> u64>§all_saved_items: Option<unsafe extern "C" fn(sd: *mut SavedTruthDataO, ta: *mut TempAllocatorI) -> *mut TtIdT>§free_saved_data: Option<unsafe extern "C" fn(sd: *mut SavedTruthDataO)>§set_mock_file_system: Option<unsafe extern "C" fn(fs: *mut OsFileSystemApi, file_io: *mut OsFileIoApi)>§any_disk_changes: Option<unsafe extern "C" fn(sd: *mut SavedTruthDataO, dir: *const c_char) -> bool>

Implementations§

Source§

impl TheTruthAssetsApi

Source

pub unsafe fn get_asset_path( &self, tt: *const TheTruthO, asset: TtIdT, path: *mut c_char, n: u32, ) -> u32

Source

pub unsafe fn get_directory_path( &self, tt: *const TheTruthO, directory: TtIdT, path: *mut c_char, n: u32, ) -> u32

Source

pub unsafe fn get_asset_path_with_extension( &self, tt: *const TheTruthO, asset: TtIdT, path: *mut c_char, n: u32, ) -> u32

Source

pub unsafe fn asset_from_path( &self, tt: *const TheTruthO, asset_root: TtIdT, path: *const c_char, ) -> TtIdT

Source

pub unsafe fn asset_from_path_with_type( &self, tt: *const TheTruthO, asset_root: TtIdT, path: *const c_char, type_: TtTypeT, ) -> TtIdT

Source

pub unsafe fn asset_object_from_path( &self, tt: *const TheTruthO, asset_root: TtIdT, path: *const c_char, ) -> TtIdT

Source

pub unsafe fn asset_object_from_path_with_type( &self, tt: *const TheTruthO, asset_root: TtIdT, path: *const c_char, type_: TtTypeT, ) -> TtIdT

Source

pub unsafe fn directory_from_path( &self, tt: *const TheTruthO, asset_root: TtIdT, path: *const c_char, ) -> TtIdT

Source

pub unsafe fn find_subdirectory_by_name( &self, tt: *const TheTruthO, asset_root: TtIdT, parent_dir: TtIdT, subdir_name: *const c_char, ) -> TtIdT

Source

pub unsafe fn unique_asset_name( &self, tt: *mut TheTruthO, asset_root: TtIdT, asset_r: *const TheTruthObjectO, desired_name: *const c_char, ) -> *const c_char

Source

pub unsafe fn unique_directory_name( &self, tt: *mut TheTruthO, asset_root: TtIdT, directory_r: *const TheTruthObjectO, desired_name: *const c_char, ) -> *const c_char

Source

pub unsafe fn object_asset_name( &self, tt: *mut TheTruthO, object: TtIdT, ) -> *const c_char

Source

pub unsafe fn find_directory_settings( &self, tt: *mut TheTruthO, relative_to: TtIdT, target_type_hash: StrhashT, asset_root: TtIdT, ) -> TtIdT

Source

pub unsafe fn object_to_config( &self, tt: *const TheTruthO, object: TtIdT, config: *mut ConfigI, buffers: *mut *mut TtAssetsBufferWriteT, buffers_ta: *mut TempAllocatorI, save_uuid: bool, )

Source

pub unsafe fn create_object_from_config( &self, tt: *mut TheTruthO, config: *mut ConfigI, buffers: *mut *mut TtAssetsBufferT, buffers_ta: *mut TempAllocatorI, ) -> TtIdT

Source

pub unsafe fn read_object_from_config( &self, tt: *mut TheTruthO, config: *mut ConfigI, buffers: *mut *mut TtAssetsBufferT, buffers_ta: *mut TempAllocatorI, id: TtIdT, )

Source

pub unsafe fn save_to_directory( &self, tt: *mut TheTruthO, asset_root: TtIdT, dir: *const c_char, ignore: *mut TtIdT, num_ignore: u32, old_std: *mut SavedTruthDataO, allocator: *mut AllocatorI, ) -> *mut SavedTruthDataO

Source

pub unsafe fn load_from_directory( &self, tt: *mut TheTruthO, dir: *const c_char, allocator: *mut AllocatorI, asset_root: *mut TtIdT, error: *mut ErrorI, ) -> *mut SavedTruthDataO

Source

pub unsafe fn current_truth_data( &self, tt: *mut TheTruthO, asset_root: TtIdT, allocator: *mut AllocatorI, ) -> *mut SavedTruthDataO

Source

pub unsafe fn revert_asset( &self, sd: *mut SavedTruthDataO, asset: TtIdT, undo_scope: TtUndoScopeT, ) -> bool

Source

pub unsafe fn save_asset(&self, sd: *mut SavedTruthDataO, asset: TtIdT) -> bool

Source

pub unsafe fn saved_name( &self, sd: *mut SavedTruthDataO, item: TtIdT, ) -> *const c_char

Source

pub unsafe fn saved_directory( &self, sd: *mut SavedTruthDataO, item: TtIdT, ) -> TtIdT

Source

pub unsafe fn saved_version(&self, sd: *mut SavedTruthDataO, item: TtIdT) -> u64

Source

pub unsafe fn all_saved_items( &self, sd: *mut SavedTruthDataO, ta: *mut TempAllocatorI, ) -> *mut TtIdT

Source

pub unsafe fn free_saved_data(&self, sd: *mut SavedTruthDataO)

Source

pub unsafe fn set_mock_file_system( &self, fs: *mut OsFileSystemApi, file_io: *mut OsFileIoApi, )

Source

pub unsafe fn any_disk_changes( &self, sd: *mut SavedTruthDataO, dir: *const c_char, ) -> bool

Trait Implementations§

Source§

impl Api for TheTruthAssetsApi

Source§

impl Clone for TheTruthAssetsApi

Source§

fn clone(&self) -> TheTruthAssetsApi

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Default for TheTruthAssetsApi

Source§

fn default() -> TheTruthAssetsApi

Returns the “default value” for a type. Read more
Source§

impl Copy for TheTruthAssetsApi

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.