pub struct Arena {
handle: Arc<Handle>,
pub bufs: Vec<Vec<u8>>,
pub buf_type: Type,
}
Expand description
Manage user allocated buffers
All buffers are released in the Drop impl.
Fields§
§handle: Arc<Handle>
§bufs: Vec<Vec<u8>>
§buf_type: Type
Implementations§
source§impl Arena
impl Arena
sourcepub fn new(handle: Arc<Handle>, buf_type: Type) -> Self
pub fn new(handle: Arc<Handle>, buf_type: Type) -> Self
Returns a new buffer manager instance
You usually do not need to use this directly. A UserBufferStream creates its own manager instance by default.
§Arguments
dev
- Device handle to get its file descriptorbuf_type
- Type of the buffers
fn requestbuffers_desc(&self) -> v4l2_requestbuffers
pub fn allocate(&mut self, count: u32) -> Result<u32>
pub fn release(&mut self) -> Result<()>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Arena
impl RefUnwindSafe for Arena
impl Send for Arena
impl Sync for Arena
impl Unpin for Arena
impl UnwindSafe for Arena
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