pub struct SurfaceBufferHandle<T: 'static>(_, _);
Expand description

Handle to a front buffer of a surface

Methods from Deref<Target = BufferObject<T>>§

Get the width of the buffer object

Get the height of the buffer object

Get the stride of the buffer object

Get the format of the buffer object

Get the handle of the buffer object

This is stored in the platform generic union BufferObjectHandle type. However the format of this handle is platform specific.

Map a region of a gbm buffer object for cpu access

This function maps a region of a gbm bo for cpu read access.

Map a region of a gbm buffer object for cpu access

This function maps a region of a gbm bo for cpu read/write access.

Write data into the buffer object

If the buffer object was created with the BufferObjectFlags::Write flag, this function can be used to write data into the buffer object. The data is copied directly into the object and it’s the responsibility of the caller to make sure the data represents valid pixel data, according to the width, height, stride and format of the buffer object.

Sets the userdata of the buffer object.

If previously userdata was set, it is returned.

Clears the set userdata of the buffer object.

Returns a reference to set userdata, if any.

Returns a mutable reference to set userdata, if any.

Takes ownership of previously set userdata, if any.

This removes the userdata from the buffer object.

Trait Implementations§

The resulting type after dereferencing.
Dereferences the value.
Mutably dereferences the value.
Executes the destructor for this type. 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.