Struct bones_schema::alloc::SchemaVec
source · pub struct SchemaVec { /* private fields */ }
Implementations§
source§impl SchemaVec
impl SchemaVec
sourcepub fn new(schema: &'static Schema) -> Self
pub fn new(schema: &'static Schema) -> Self
Initialize an empty SchemaVec
for items with the given schema.
sourcepub fn try_push_box(
&mut self,
item: SchemaBox,
) -> Result<(), SchemaMismatchError>
pub fn try_push_box( &mut self, item: SchemaBox, ) -> Result<(), SchemaMismatchError>
Push the item into the end of the vector.
sourcepub fn try_get_mut<T: HasSchema>(
&mut self,
idx: usize,
) -> Result<Option<&mut T>, SchemaMismatchError>
pub fn try_get_mut<T: HasSchema>( &mut self, idx: usize, ) -> Result<Option<&mut T>, SchemaMismatchError>
sourcepub fn get_ref_mut(&mut self, idx: usize) -> Option<SchemaRefMut<'_>>
pub fn get_ref_mut(&mut self, idx: usize) -> Option<SchemaRefMut<'_>>
Get an item with the given index.
sourcepub fn iter(&self) -> SchemaVecIter<'_> ⓘ
pub fn iter(&self) -> SchemaVecIter<'_> ⓘ
Iterate over values in the vec
sourcepub fn iter_mut(&mut self) -> SchemaVecIterMut<'_> ⓘ
pub fn iter_mut(&mut self) -> SchemaVecIterMut<'_> ⓘ
Iterate mutably over values in the vec
sourcepub fn try_into_svec<T: HasSchema>(self) -> Result<SVec<T>, SchemaMismatchError>
pub fn try_into_svec<T: HasSchema>(self) -> Result<SVec<T>, SchemaMismatchError>
Trait Implementations§
source§impl<'a> IntoIterator for &'a SchemaVec
impl<'a> IntoIterator for &'a SchemaVec
source§impl<'a> IntoIterator for &'a mut SchemaVec
impl<'a> IntoIterator for &'a mut SchemaVec
source§impl PartialEq for SchemaVec
impl PartialEq for SchemaVec
impl Eq for SchemaVec
impl Send for SchemaVec
impl Sync for SchemaVec
Auto Trait Implementations§
impl Freeze for SchemaVec
impl !RefUnwindSafe for SchemaVec
impl Unpin for SchemaVec
impl !UnwindSafe for SchemaVec
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: 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
)§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more