Struct ark_api::world::DataHandle
source · [−]#[repr(transparent)]pub struct DataHandle(pub DataHandle);
Expand description
Represents a data object.
Tuple Fields
0: DataHandle
Implementations
sourceimpl 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
sourceimpl Clone for DataHandle
impl Clone for DataHandle
sourcefn clone(&self) -> DataHandle
fn clone(&self) -> DataHandle
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for DataHandle
impl Debug for DataHandle
sourceimpl Hash for DataHandle
impl Hash for DataHandle
sourceimpl PartialEq<DataHandle> for DataHandle
impl PartialEq<DataHandle> for DataHandle
sourcefn 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 ==
. Read more
sourceimpl ValueConverterTrait<DataHandle> for ValueConverter
impl ValueConverterTrait<DataHandle> for ValueConverter
sourcefn into_value(v: DataHandle) -> Value
fn into_value(v: DataHandle) -> Value
Wraps the passed-in value in a Value
enum.
sourcefn from_value(v: &Value) -> DataHandle
fn from_value(v: &Value) -> DataHandle
Extracts the value from a Value
enum.
impl Copy for DataHandle
impl Eq for DataHandle
impl StructuralEq for DataHandle
impl StructuralPartialEq for DataHandle
Auto Trait Implementations
impl RefUnwindSafe for DataHandle
impl Send for DataHandle
impl Sync for DataHandle
impl Unpin for DataHandle
impl UnwindSafe for DataHandle
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