Struct dma_buf::MappedDmaBuf

source ·
pub struct MappedDmaBuf { /* private fields */ }
Expand description

A DmaBuf mapped in memory

Implementations§

Calls a closure to read the buffer content

DMA-Buf requires the user-space to call the DMA_BUF_IOCTL_SYNC ioctl before and after any CPU access to a buffer in order to maintain the cache coherency. The closure will be run with those primitives called for a read access from the CPU.

The result of the closure will be returned.

Errors

Will return [Error] if the underlying ioctl or the closure fails

Calls a closure to read from and write to the buffer content

DMA-Buf requires the user-space to call the DMA_BUF_IOCTL_SYNC ioctl before and after any CPU access to a buffer in order to maintain the cache coherency. The closure will be run with those primitives called for a read and write access from the CPU.

The result of the closure will be returned on success. On failure, the closure must return Error::Closure

Errors

Will return [Error] if the underlying ioctl or the closure fails

Calls a closure to read from and write to the buffer content

DMA-Buf requires the user-space to call the DMA_BUF_IOCTL_SYNC ioctl before and after any CPU access to a buffer in order to maintain the cache coherency. The closure will be run with those primitives called for a read and write access from the CPU.

The closure must return () on success. On failure, the closure must return Error::Closure.

Errors

Will return [Error] if the underlying ioctl or the closure fails

Trait Implementations§

Extracts the raw file descriptor. Read more
Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.