Enum bones_scripting::lua::bindings::ecsref::EcsRefBorrowMutKind
source · pub enum EcsRefBorrowMutKind<'a> {
Resource(RefMut<'a, Option<SchemaBox>>),
Component(ComponentBorrowMut<'a>),
Free(RefMut<'a, SchemaBox>),
Asset(Option<MappedRefMut<'a, Cid, LoadedAsset, SchemaBox>>),
}
Expand description
A kind of mutable borrow of an EcsRef
.
Variants§
Resource(RefMut<'a, Option<SchemaBox>>)
Component(ComponentBorrowMut<'a>)
Free(RefMut<'a, SchemaBox>)
Asset(Option<MappedRefMut<'a, Cid, LoadedAsset, SchemaBox>>)
Implementations§
source§impl EcsRefBorrowMutKind<'_>
impl EcsRefBorrowMutKind<'_>
sourcepub fn schema_ref_mut(&mut self) -> Result<SchemaRefMut<'_>, EcsRefBorrowError>
pub fn schema_ref_mut(&mut self) -> Result<SchemaRefMut<'_>, EcsRefBorrowError>
Get the borrow as a [SchemaRefMut
].
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 EcsRefBorrowMutKind<'a>
impl<'a> !RefUnwindSafe for EcsRefBorrowMutKind<'a>
impl<'a> !Send for EcsRefBorrowMutKind<'a>
impl<'a> !Sync for EcsRefBorrowMutKind<'a>
impl<'a> Unpin for EcsRefBorrowMutKind<'a>
impl<'a> !UnwindSafe for EcsRefBorrowMutKind<'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