Struct luminance::buffer::Buffer [] [src]

pub struct Buffer<T> { /* fields omitted */ }

A Buffer is a GPU region you can picture as an array. It has a static size and cannot be resized. The size is expressed in number of elements lying in the buffer, not in bytes.

Methods

impl<T> Buffer<T>
[src]

[src]

Create a new Buffer with a given number of elements.

[src]

Get the length of the buffer.

[src]

Retrieve an element from the Buffer.

Checks boundaries.

[src]

Retrieve the whole content of the Buffer.

[src]

Set a value at a given index in the Buffer.

Checks boundaries.

[src]

Write a whole slice into a buffer.

If the slice you pass in as less items than the length of the buffer, you’ll get a BufferError::TooFewValues. If it has more, you’ll get BufferError::TooManyValues.

In all cases, the copy will be performed and clamped to reasonable length.

[src]

Fill the Buffer with a single value.

[src]

Fill the whole buffer with an array.

[src]

Convert a buffer to its raw representation.

[src]

Obtain an immutable slice view into the buffer.

[src]

Obtain a mutable slice view into the buffer.

Methods from Deref<Target = RawBuffer>

[src]

Obtain an immutable slice view into the buffer.

[src]

Obtain a mutable slice view into the buffer.

Trait Implementations

impl<T: Debug> Debug for Buffer<T>
[src]

[src]

Formats the value using the given formatter.

impl<T: Eq> Eq for Buffer<T>
[src]

impl<T: PartialEq> PartialEq for Buffer<T>
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

[src]

This method tests for !=.

impl<T> Deref for Buffer<T>
[src]

The resulting type after dereferencing.

[src]

Dereferences the value.

impl<T> DerefMut for Buffer<T>
[src]

[src]

Mutably dereferences the value.

impl<T> Drop for Buffer<T>
[src]

[src]

Executes the destructor for this type. Read more