Struct bones_schema::ptr::StructRefAccess
source · pub struct StructRefAccess<'a>(/* private fields */);
Expand description
Helper for accessing the inner data of a schema ref at runtime.
Implementations§
source§impl<'a> StructRefAccess<'a>
impl<'a> StructRefAccess<'a>
sourcepub fn info(&self) -> &'static StructSchemaInfo
pub fn info(&self) -> &'static StructSchemaInfo
Get the StructSchemaInfo
for this struct.
sourcepub fn fields(&self) -> StructRefFieldIter<'_> ⓘ
pub fn fields(&self) -> StructRefFieldIter<'_> ⓘ
Interate over the fields on the struct.
sourcepub fn field<'i, I: Into<FieldIdx<'i>>>(
self,
field_idx: I,
) -> Option<SchemaRefAccess<'a>>
pub fn field<'i, I: Into<FieldIdx<'i>>>( self, field_idx: I, ) -> Option<SchemaRefAccess<'a>>
Access a field, if it exists.
sourcepub fn as_schema_ref(&self) -> SchemaRef<'a>
pub fn as_schema_ref(&self) -> SchemaRef<'a>
Convert to a SchemaRef
.
Trait Implementations§
source§impl<'a> Clone for StructRefAccess<'a>
impl<'a> Clone for StructRefAccess<'a>
source§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
)