Struct bones_lib::ecs::prelude::EnumRefAccess
pub struct EnumRefAccess<'a>(pub SchemaRef<'a>);
Expand description
Helper for accessing the inner data of a schema ref at runtime.
Tuple Fields§
§0: SchemaRef<'a>
Implementations§
§impl<'a> EnumRefAccess<'a>
impl<'a> EnumRefAccess<'a>
pub fn schema(&self) -> &'static Schema
pub fn schema(&self) -> &'static Schema
Get the enum’s schema.
pub fn info(&self) -> &'static EnumSchemaInfo
pub fn info(&self) -> &'static EnumSchemaInfo
Get the enum schema info.
pub fn variant_info(&self) -> &'static VariantInfo
pub fn variant_info(&self) -> &'static VariantInfo
Get the VariantInfo
for the current variant.
pub fn variant_struct_info(&self) -> &'static StructSchemaInfo
pub fn variant_struct_info(&self) -> &'static StructSchemaInfo
Get the StructSchemaInfo
for the current variant.
pub fn variant_idx(&self) -> u32
pub fn variant_idx(&self) -> u32
Get the currently-selected variant index.
pub fn variant_name(&self) -> &'static str
pub fn variant_name(&self) -> &'static str
Get the name of the currently selected variant.
pub fn value(&self) -> StructRefAccess<'a>
pub fn value(&self) -> StructRefAccess<'a>
Get a reference to the enum’s currently selected value.
Trait Implementations§
§impl<'a> Clone for EnumRefAccess<'a>
impl<'a> Clone for EnumRefAccess<'a>
§fn clone(&self) -> EnumRefAccess<'a>
fn clone(&self) -> EnumRefAccess<'a>
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 moreimpl<'a> Copy for EnumRefAccess<'a>
Auto Trait Implementations§
impl<'a> Freeze for EnumRefAccess<'a>
impl<'a> !RefUnwindSafe for EnumRefAccess<'a>
impl<'a> !Send for EnumRefAccess<'a>
impl<'a> !Sync for EnumRefAccess<'a>
impl<'a> Unpin for EnumRefAccess<'a>
impl<'a> !UnwindSafe for EnumRefAccess<'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
source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)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
)