pub struct EcsRef {
pub data: EcsRefData,
pub path: Ustr,
}
Expand description
A reference to an ECS-compatible value.
Fields§
§data: EcsRefData
The kind of reference.
path: Ustr
The path to the desired field.
Implementations§
source§impl EcsRef
impl EcsRef
sourcepub fn borrow(&self) -> EcsRefBorrow<'_>
pub fn borrow(&self) -> EcsRefBorrow<'_>
Borrow the value pointed to by the EcsRef
sourcepub fn borrow_mut(&self) -> EcsRefBorrowMut<'_>
pub fn borrow_mut(&self) -> EcsRefBorrowMut<'_>
Mutably borrow the value pointed to by the EcsRef
sourcepub fn into_value(self, ctx: Context<'_>) -> Value<'_>
pub fn into_value(self, ctx: Context<'_>) -> Value<'_>
Convert into a lua value.
Trait Implementations§
source§impl<'gc> FromValue<'gc> for &'gc EcsRef
impl<'gc> FromValue<'gc> for &'gc EcsRef
fn from_value(_ctx: Context<'gc>, value: Value<'gc>) -> Result<Self, TypeError>
source§impl MetatableFn for EcsRef
impl MetatableFn for EcsRef
source§fn metatable_fn(&self) -> fn(_: Context<'_>) -> Table<'_>
fn metatable_fn(&self) -> fn(_: Context<'_>) -> Table<'_>
Get the function that may be used to retrieve the metatable to use for this EcsRef
.
Auto Trait Implementations§
impl Freeze for EcsRef
impl !RefUnwindSafe for EcsRef
impl !Send for EcsRef
impl !Sync for EcsRef
impl Unpin for EcsRef
impl !UnwindSafe for EcsRef
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§impl<T> FromWorld for Twhere
T: Default,
impl<T> FromWorld for Twhere
T: Default,
§fn from_world(_world: &World) -> T
fn from_world(_world: &World) -> T
Creates
Self
using data from the given [World
].