#[repr(C)]pub struct Buffer { /* private fields */ }
Expand description
Struct representing a buffer, with which to interact with the kernel.
Implementations§
Source§impl Buffer
impl Buffer
Sourcepub fn with_planes(type_: BufType, planes: Vec<Plane>) -> Buffer
pub fn with_planes(type_: BufType, planes: Vec<Plane>) -> Buffer
Create a new buffer of the given type.
pub fn type_(&self) -> BufType
pub fn index(&self) -> u32
pub fn add_plane(&mut self, plane: Plane)
Sourcepub fn set_request(&mut self, request: &Request)
pub fn set_request(&mut self, request: &Request)
Set a request fd to be passed alongside this buffer.
Sourcepub fn set_bytesused(&mut self, num_plane: usize, bytesused: usize)
pub fn set_bytesused(&mut self, num_plane: usize, bytesused: usize)
Set the bytesused field.
Sourcepub fn set_offset(&mut self, offset: u32)
pub fn set_offset(&mut self, offset: u32)
Set the m.offset field.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Buffer
impl RefUnwindSafe for Buffer
impl !Send for Buffer
impl !Sync for Buffer
impl Unpin for Buffer
impl UnwindSafe for Buffer
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