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