Struct bones_lib::prelude::bones_schema::ptr::EnumRefMutAccess
pub struct EnumRefMutAccess<'a>(pub SchemaRefMut<'a>);
Expand description
Helper for accessing the inner data of a schema ref at runtime.
Tuple Fields§
§0: SchemaRefMut<'a>
Implementations§
§impl<'a> EnumRefMutAccess<'a>
impl<'a> EnumRefMutAccess<'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_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) -> StructRefMutAccess<'a>
pub fn value(&self) -> StructRefMutAccess<'a>
Get a reference to the enum’s currently selected value.
Auto Trait Implementations§
impl<'a> Freeze for EnumRefMutAccess<'a>
impl<'a> !RefUnwindSafe for EnumRefMutAccess<'a>
impl<'a> !Send for EnumRefMutAccess<'a>
impl<'a> !Sync for EnumRefMutAccess<'a>
impl<'a> Unpin for EnumRefMutAccess<'a>
impl<'a> !UnwindSafe for EnumRefMutAccess<'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