#[repr(C)]pub struct ComponentEnumModelVecSlice {
pub ptr: *const ComponentEnumModel,
pub len: usize,
}Expand description
C-compatible slice type for $struct_name. This is a non-owning view into a Vec’s data.
Fields§
§ptr: *const ComponentEnumModel§len: usizeImplementations§
Source§impl ComponentEnumModelVecSlice
impl ComponentEnumModelVecSlice
Sourcepub const fn as_ptr(&self) -> *const ComponentEnumModel
pub const fn as_ptr(&self) -> *const ComponentEnumModel
Returns a pointer to the slice’s data.
Sourcepub fn as_slice(&self) -> &[ComponentEnumModel]
pub fn as_slice(&self) -> &[ComponentEnumModel]
Converts the C-slice to a Rust slice.
Sourcepub fn get(&self, index: usize) -> Option<&ComponentEnumModel>
pub fn get(&self, index: usize) -> Option<&ComponentEnumModel>
Returns a reference to the element at the given index, or None if out of bounds.
Sourcepub fn iter(&self) -> Iter<'_, ComponentEnumModel>
pub fn iter(&self) -> Iter<'_, ComponentEnumModel>
Returns an iterator over the elements.
Trait Implementations§
Source§impl Clone for ComponentEnumModelVecSlice
impl Clone for ComponentEnumModelVecSlice
Source§fn clone(&self) -> ComponentEnumModelVecSlice
fn clone(&self) -> ComponentEnumModelVecSlice
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ComponentEnumModelVecSlice
impl Debug for ComponentEnumModelVecSlice
impl Copy for ComponentEnumModelVecSlice
impl Send for ComponentEnumModelVecSlice
impl Sync for ComponentEnumModelVecSlice
Auto Trait Implementations§
impl Freeze for ComponentEnumModelVecSlice
impl RefUnwindSafe for ComponentEnumModelVecSlice
impl Unpin for ComponentEnumModelVecSlice
impl UnsafeUnpin for ComponentEnumModelVecSlice
impl UnwindSafe for ComponentEnumModelVecSlice
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