Struct bones_lib::prelude::bones_schema::ptr::StructRefMutAccess
pub struct StructRefMutAccess<'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> StructRefMutAccess<'a>
impl<'a> StructRefMutAccess<'a>
pub fn schema(&self) -> &'static Schema
pub fn schema(&self) -> &'static Schema
Get the struct’s schema.
pub fn info(&self) -> &'static StructSchemaInfo
pub fn info(&self) -> &'static StructSchemaInfo
Get the StructSchemaInfo
for this struct.
pub fn into_field<'i, I>(
self,
field_idx: I,
) -> Result<SchemaRefMutAccess<'a>, StructRefMutAccess<'a>>
pub fn into_field<'i, I>( self, field_idx: I, ) -> Result<SchemaRefMutAccess<'a>, StructRefMutAccess<'a>>
Access a field, if it exists.
pub fn fields(&mut self) -> StructRefMutFieldIter<'_> ⓘ
pub fn fields(&mut self) -> StructRefMutFieldIter<'_> ⓘ
Iterate over fields in the struct.
pub fn into_fields(self) -> StructRefMutFieldIter<'a> ⓘ
pub fn into_fields(self) -> StructRefMutFieldIter<'a> ⓘ
Consume to create an iterator over fields in the struct.
Auto Trait Implementations§
impl<'a> Freeze for StructRefMutAccess<'a>
impl<'a> !RefUnwindSafe for StructRefMutAccess<'a>
impl<'a> !Send for StructRefMutAccess<'a>
impl<'a> !Sync for StructRefMutAccess<'a>
impl<'a> Unpin for StructRefMutAccess<'a>
impl<'a> !UnwindSafe for StructRefMutAccess<'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