Struct bones_asset::StructRefAccess
pub struct StructRefAccess<'a>(/* private fields */);
Expand description
Helper for accessing the inner data of a schema ref at runtime.
Implementations§
§impl<'a> StructRefAccess<'a>
impl<'a> StructRefAccess<'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 fields(&self) -> StructRefFieldIter<'_> ⓘ
pub fn fields(&self) -> StructRefFieldIter<'_> ⓘ
Interate over the fields on the struct.
pub fn field<'i, I>(self, field_idx: I) -> Option<SchemaRefAccess<'a>>where
I: Into<FieldIdx<'i>>,
pub fn field<'i, I>(self, field_idx: I) -> Option<SchemaRefAccess<'a>>where I: Into<FieldIdx<'i>>,
Access a field, if it exists.
pub fn as_schema_ref(&self) -> SchemaRef<'a>
pub fn as_schema_ref(&self) -> SchemaRef<'a>
Convert to a SchemaRef
.
Trait Implementations§
§impl<'a> Clone for StructRefAccess<'a>
impl<'a> Clone for StructRefAccess<'a>
§fn clone(&self) -> StructRefAccess<'a>
fn clone(&self) -> StructRefAccess<'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 StructRefAccess<'a>
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for StructRefAccess<'a>
impl<'a> !Send for StructRefAccess<'a>
impl<'a> !Sync for StructRefAccess<'a>
impl<'a> Unpin for StructRefAccess<'a>
impl<'a> !UnwindSafe for StructRefAccess<'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