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