Struct bones_lib::prelude::bones_schema::ptr::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>>
pub fn field<'i, I>(self, field_idx: I) -> Option<SchemaRefAccess<'a>>
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> Freeze for StructRefAccess<'a>
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
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
)