#[repr(C)]pub struct VertexAttributeVecSlice {
pub ptr: *const VertexAttribute,
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 VertexAttribute§len: usizeImplementations§
Source§impl VertexAttributeVecSlice
impl VertexAttributeVecSlice
Sourcepub const fn as_ptr(&self) -> *const VertexAttribute
pub const fn as_ptr(&self) -> *const VertexAttribute
Returns a pointer to the slice’s data.
Sourcepub fn as_slice(&self) -> &[VertexAttribute]
pub fn as_slice(&self) -> &[VertexAttribute]
Converts the C-slice to a Rust slice.
Sourcepub fn get(&self, index: usize) -> Option<&VertexAttribute>
pub fn get(&self, index: usize) -> Option<&VertexAttribute>
Returns a reference to the element at the given index, or None if out of bounds.
Sourcepub fn iter(&self) -> Iter<'_, VertexAttribute>
pub fn iter(&self) -> Iter<'_, VertexAttribute>
Returns an iterator over the elements.
Trait Implementations§
Source§impl Clone for VertexAttributeVecSlice
impl Clone for VertexAttributeVecSlice
Source§fn clone(&self) -> VertexAttributeVecSlice
fn clone(&self) -> VertexAttributeVecSlice
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 VertexAttributeVecSlice
impl Debug for VertexAttributeVecSlice
impl Copy for VertexAttributeVecSlice
impl Send for VertexAttributeVecSlice
impl Sync for VertexAttributeVecSlice
Auto Trait Implementations§
impl Freeze for VertexAttributeVecSlice
impl RefUnwindSafe for VertexAttributeVecSlice
impl Unpin for VertexAttributeVecSlice
impl UnsafeUnpin for VertexAttributeVecSlice
impl UnwindSafe for VertexAttributeVecSlice
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