[−][src]Struct v4l::io::userptr::arena::Arena
Manage user allocated buffers
All buffers are released in the Drop impl.
Implementations
impl<'a> Arena<'a>
[src]
pub fn new(dev: &'a dyn Device) -> Self
[src]
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
- Capture device ref to get its file descriptor
Example
use v4l::capture::Device; use v4l::io::userptr::Arena; let dev = Device::new(0); if let Ok(dev) = dev { let mgr = Arena::new(&dev); }
Trait Implementations
impl<'a> Arena for Arena<'a>
[src]
type Buffer = Buffer<'a>
Type of the buffers (DMA, mmap, userptr)
fn allocate(&mut self, count: u32) -> Result<u32>
[src]
fn release(&mut self) -> Result<()>
[src]
fn queue(&mut self) -> Result<()>
[src]
fn dequeue(&mut self) -> Result<Self::Buffer>
[src]
impl<'a> Drop for Arena<'a>
[src]
Auto Trait Implementations
impl<'a> RefUnwindSafe for Arena<'a>
impl<'a> Send for Arena<'a>
impl<'a> Sync for Arena<'a>
impl<'a> Unpin for Arena<'a>
impl<'a> UnwindSafe for Arena<'a>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,