pub struct ComponentDefVec { /* private fields */ }Implementations§
Source§impl ComponentDefVec
impl ComponentDefVec
pub fn new() -> ComponentDefVec
pub fn with_capacity(cap: usize) -> ComponentDefVec
pub const fn from_const_slice(input: &'static [ComponentDef]) -> ComponentDefVec
pub fn from_vec(input: Vec<ComponentDef>) -> ComponentDefVec
pub fn iter(&self) -> Iter<'_, ComponentDef>
pub const fn len(&self) -> usize
pub const fn capacity(&self) -> usize
pub const fn is_empty(&self) -> bool
Sourcepub fn get(&self, index: usize) -> Option<&ComponentDef>
pub fn get(&self, index: usize) -> Option<&ComponentDef>
Returns a reference to the element at the given index (Rust-only, inline).
Sourcepub fn c_get(&self, index: usize) -> OptionComponentDefwhere
ComponentDef: Clone,
pub fn c_get(&self, index: usize) -> OptionComponentDefwhere
ComponentDef: Clone,
C-API compatible get function. Returns a copy of the element at the given index. Returns None if the index is out of bounds.
Sourcepub fn as_slice(&self) -> &[ComponentDef]
pub fn as_slice(&self) -> &[ComponentDef]
Returns the vec as a Rust slice (Rust-only, not C-API compatible).
Sourcepub fn as_c_slice(&self) -> ComponentDefVecSlice
pub fn as_c_slice(&self) -> ComponentDefVecSlice
Returns a C-compatible slice of the entire Vec.
Sourcepub fn as_c_slice_range(&self, start: usize, end: usize) -> ComponentDefVecSlice
pub fn as_c_slice_range(&self, start: usize, end: usize) -> ComponentDefVecSlice
Returns a C-compatible slice of a range within the Vec. If the range is out of bounds, it is clamped to the valid range.
Sourcepub fn as_ptr(&self) -> *const ComponentDef
pub fn as_ptr(&self) -> *const ComponentDef
Returns a pointer to the Vec’s data.
Use len() to get the number of elements.
Source§impl ComponentDefVec
impl ComponentDefVec
pub fn from_copy_on_write( input: Cow<'static, [ComponentDef]>, ) -> ComponentDefVec
Sourcepub fn from_item(item: ComponentDef) -> ComponentDefVec
pub fn from_item(item: ComponentDef) -> ComponentDefVec
Creates a Vec containing a single element
Sourcepub unsafe fn copy_from_ptr(
ptr: *const ComponentDef,
len: usize,
) -> ComponentDefVec
pub unsafe fn copy_from_ptr( ptr: *const ComponentDef, len: usize, ) -> ComponentDefVec
Copies elements from a C array pointer into a new Vec.
§Safety
ptrmust be valid for readinglenelements- The memory must be properly aligned for
$struct_type - The elements are cloned, so
$struct_typemust implementClone
Sourcepub fn clone_self(&self) -> ComponentDefVec
pub fn clone_self(&self) -> ComponentDefVec
NOTE: CLONES the memory if the memory is external or &’static Moves the memory out if the memory is library-allocated
Sourcepub fn into_library_owned_vec(self) -> Vec<ComponentDef>
pub fn into_library_owned_vec(self) -> Vec<ComponentDef>
NOTE: CLONES the memory if the memory is external or &’static Moves the memory out if the memory is library-allocated
Source§impl ComponentDefVec
impl ComponentDefVec
pub fn as_mut_ptr(&mut self) -> *mut ComponentDef
pub fn sort_by<F>(&mut self, compare: F)
pub fn push(&mut self, value: ComponentDef)
pub fn insert(&mut self, index: usize, element: ComponentDef)
pub fn remove(&mut self, index: usize)
pub fn pop(&mut self) -> Option<ComponentDef>
pub fn iter_mut(&mut self) -> IterMut<'_, ComponentDef>
pub fn into_iter(self) -> IntoIter<ComponentDef>
pub fn append(&mut self, other: &mut ComponentDefVec)
pub fn reserve(&mut self, additional: usize)
pub fn truncate(&mut self, len: usize)
pub fn retain<F>(&mut self, f: F)
Trait Implementations§
Source§impl AsMut<[ComponentDef]> for ComponentDefVec
impl AsMut<[ComponentDef]> for ComponentDefVec
Source§fn as_mut(&mut self) -> &mut [ComponentDef]
fn as_mut(&mut self) -> &mut [ComponentDef]
Source§impl AsRef<[ComponentDef]> for ComponentDefVec
impl AsRef<[ComponentDef]> for ComponentDefVec
Source§fn as_ref(&self) -> &[ComponentDef]
fn as_ref(&self) -> &[ComponentDef]
Source§impl Clone for ComponentDefVec
impl Clone for ComponentDefVec
Source§fn clone(&self) -> ComponentDefVec
fn clone(&self) -> ComponentDefVec
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ComponentDefVec
impl Debug for ComponentDefVec
Source§impl Default for ComponentDefVec
impl Default for ComponentDefVec
Source§fn default() -> ComponentDefVec
fn default() -> ComponentDefVec
Source§impl Drop for ComponentDefVec
impl Drop for ComponentDefVec
Source§impl Extend<ComponentDef> for ComponentDefVec
impl Extend<ComponentDef> for ComponentDefVec
Source§fn extend<T>(&mut self, iter: T)where
T: IntoIterator<Item = ComponentDef>,
fn extend<T>(&mut self, iter: T)where
T: IntoIterator<Item = ComponentDef>,
Source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
extend_one)Source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
extend_one)Source§impl From<&'static [ComponentDef]> for ComponentDefVec
impl From<&'static [ComponentDef]> for ComponentDefVec
Source§fn from(input: &'static [ComponentDef]) -> ComponentDefVec
fn from(input: &'static [ComponentDef]) -> ComponentDefVec
Source§impl From<ComponentDefVec> for Vec<ComponentDef>
impl From<ComponentDefVec> for Vec<ComponentDef>
Source§fn from(input: ComponentDefVec) -> Vec<ComponentDef>
fn from(input: ComponentDefVec) -> Vec<ComponentDef>
Source§impl From<Vec<ComponentDef>> for ComponentDefVec
impl From<Vec<ComponentDef>> for ComponentDefVec
Source§fn from(input: Vec<ComponentDef>) -> ComponentDefVec
fn from(input: Vec<ComponentDef>) -> ComponentDefVec
Source§impl FromIterator<ComponentDef> for ComponentDefVec
impl FromIterator<ComponentDef> for ComponentDefVec
Source§fn from_iter<T>(iter: T) -> ComponentDefVecwhere
T: IntoIterator<Item = ComponentDef>,
fn from_iter<T>(iter: T) -> ComponentDefVecwhere
T: IntoIterator<Item = ComponentDef>,
impl Send for ComponentDefVec
impl Sync for ComponentDefVec
Auto Trait Implementations§
impl Freeze for ComponentDefVec
impl RefUnwindSafe for ComponentDefVec
impl Unpin for ComponentDefVec
impl UnsafeUnpin for ComponentDefVec
impl UnwindSafe for ComponentDefVec
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more