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