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