pub struct WorldData { /* private fields */ }
Expand description
Helper struct that represents a data object.
Implementations
sourceimpl WorldData
impl WorldData
sourcepub fn create(create_data_type: CreateDataType, input_data: &[u8]) -> Self
pub fn create(create_data_type: CreateDataType, input_data: &[u8]) -> Self
Creates a WorldData
from the passed-in input data.
sourcepub fn create_struct<T: Sized>(
create_data_type: CreateDataType,
input_data: &T
) -> Self
pub fn create_struct<T: Sized>(
create_data_type: CreateDataType,
input_data: &T
) -> Self
Creates a WorldData
from the passed-in input data.
sourcepub fn create_formatted_text(input_data: &str) -> Self
pub fn create_formatted_text(input_data: &str) -> Self
Creates a FormattedText
object from the passed-in string.
sourcepub fn create_render_module_data(
module_dependency_name: &str,
input_data: &[u8]
) -> Self
pub fn create_render_module_data(
module_dependency_name: &str,
input_data: &[u8]
) -> Self
Creates a RenderModuleData
object from the passed-in module dependency name and data.
sourcepub fn create_audio_module_data(
module_dependency_name: &str,
input_data: &[u8]
) -> Self
pub fn create_audio_module_data(
module_dependency_name: &str,
input_data: &[u8]
) -> Self
Creates a AudioModuleData
object from the passed-in module dependency name and data.
sourcepub fn retrieve_data<T: Sized>(&self, t: RetrieveDataType) -> T
pub fn retrieve_data<T: Sized>(&self, t: RetrieveDataType) -> T
Gets different data from this data object.
sourcepub fn data_type(&self) -> WorldDataType
pub fn data_type(&self) -> WorldDataType
Retrieves the internal data type of the WorldData
instance.
sourcepub fn get_data_handle(&self) -> DataHandle
pub fn get_data_handle(&self) -> DataHandle
Gets the DataHandle
of this data object.
sourcepub fn from_data_handle(handle: DataHandle) -> Self
pub fn from_data_handle(handle: DataHandle) -> Self
Adopts a raw data handle and increases its ref count.
sourcepub fn set_debug_name(&self, name: &str)
pub fn set_debug_name(&self, name: &str)
Sets a debug name of this data object. Useful for debugging memory usage and leaks.
sourcepub fn debug_name(&self) -> String
pub fn debug_name(&self) -> String
Gets a debug name of this data object.
Trait Implementations
sourceimpl PartialEq<WorldData> for WorldData
impl PartialEq<WorldData> for WorldData
sourceimpl ValueConverterTrait<WorldData> for ValueConverter
impl ValueConverterTrait<WorldData> for ValueConverter
sourcefn into_value(v: WorldData) -> Value
fn into_value(v: WorldData) -> Value
Wraps the passed-in value in a Value
enum.
sourcefn from_value(v: &Value) -> WorldData
fn from_value(v: &Value) -> WorldData
Extracts the value from a Value
enum.
impl Eq for WorldData
impl StructuralEq for WorldData
impl StructuralPartialEq for WorldData
Auto Trait Implementations
impl RefUnwindSafe for WorldData
impl Send for WorldData
impl Sync for WorldData
impl Unpin for WorldData
impl UnwindSafe for WorldData
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more