Struct bones_schema::ptr::EnumRefMutAccess
source · 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§
source§impl<'a> EnumRefMutAccess<'a>
impl<'a> EnumRefMutAccess<'a>
sourcepub fn info(&self) -> &'static EnumSchemaInfo
pub fn info(&self) -> &'static EnumSchemaInfo
Get the enum schema info.
sourcepub fn variant_idx(&self) -> u32
pub fn variant_idx(&self) -> u32
Get the currently-selected variant index.
sourcepub fn variant_name(&self) -> &'static str
pub fn variant_name(&self) -> &'static str
Get the name of the currently selected variant.
sourcepub 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