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