Enum bones_scripting::lua::bindings::ecsref::EcsRefBorrowKind
source · pub enum EcsRefBorrowKind<'a> {
Resource(Ref<'a, Option<SchemaBox>>),
Component(ComponentBorrow<'a>),
Free(Ref<'a, SchemaBox>),
Asset(Option<MappedRef<'a, Cid, LoadedAsset, SchemaBox>>),
}
Expand description
A kind of borrow into an EcsRef
.
Variants§
Resource(Ref<'a, Option<SchemaBox>>)
Component(ComponentBorrow<'a>)
Free(Ref<'a, SchemaBox>)
Asset(Option<MappedRef<'a, Cid, LoadedAsset, SchemaBox>>)
Implementations§
source§impl EcsRefBorrowKind<'_>
impl EcsRefBorrowKind<'_>
sourcepub fn schema_ref(&self) -> Result<SchemaRef<'_>, EcsRefBorrowError>
pub fn schema_ref(&self) -> Result<SchemaRef<'_>, EcsRefBorrowError>
Get the borrow as a [SchemaRef
].
Will return none if the value does not exist, such as an unloaded asset or a component that is not set for a given entity.
Auto Trait Implementations§
impl<'a> Freeze for EcsRefBorrowKind<'a>
impl<'a> !RefUnwindSafe for EcsRefBorrowKind<'a>
impl<'a> !Send for EcsRefBorrowKind<'a>
impl<'a> !Sync for EcsRefBorrowKind<'a>
impl<'a> Unpin for EcsRefBorrowKind<'a>
impl<'a> !UnwindSafe for EcsRefBorrowKind<'a>
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