Struct ark_api::world::DataHandle
source · #[repr(transparent)]pub struct DataHandle(pub DataHandle);Expand description
Represents a data object.
Tuple Fields§
§0: DataHandleImplementations§
source§impl DataHandle
impl DataHandle
pub fn from_ffi(h: DataHandle) -> Self
pub fn as_ffi(self) -> DataHandle
sourcepub fn is_valid(self) -> bool
pub fn is_valid(self) -> bool
NOTE: This does not check whether there’s actually a data object represented by this
data handle. For that, use World::is_valid_data.
pub fn try_from_ffi(h: DataHandle) -> Option<Self>
pub fn try_to_ffi(self) -> Option<u64>
pub fn read_from<T: Sized>(self, retrieve_data_type: RetrieveDataType) -> T
pub fn read<T: Sized>(self) -> T
pub fn read_str_from(self, retrieve_data_type: RetrieveDataType) -> String
pub fn read_str(self) -> String
pub fn read_vec_from<T: Sized + Clone>( self, retrieve_data_type: RetrieveDataType ) -> Vec<T>
pub fn read_vec<T: Sized + Clone>(self) -> Vec<T>
Trait Implementations§
source§impl Clone for DataHandle
impl Clone for DataHandle
source§fn clone(&self) -> DataHandle
fn clone(&self) -> DataHandle
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl Debug for DataHandle
impl Debug for DataHandle
source§impl Hash for DataHandle
impl Hash for DataHandle
source§impl PartialEq<DataHandle> for DataHandle
impl PartialEq<DataHandle> for DataHandle
source§fn eq(&self, other: &DataHandle) -> bool
fn eq(&self, other: &DataHandle) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl ValueConverterTrait<DataHandle> for ValueConverter
impl ValueConverterTrait<DataHandle> for ValueConverter
source§fn into_value(v: DataHandle) -> Value
fn into_value(v: DataHandle) -> Value
Wraps the passed-in value in a
Value enum.source§fn from_value(v: &Value) -> DataHandle
fn from_value(v: &Value) -> DataHandle
Extracts the value from a
Value enum.