Struct vulkano::buffer::sys::Buffer

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

A storage for raw bytes.

Unlike RawBuffer, a Buffer has memory backing it, and can be used normally.

Implementations

Returns the type of memory that is backing this buffer.

Returns the memory requirements for this buffer.

Returns the flags the buffer was created with.

Returns the size of the buffer in bytes.

Returns the usage the buffer was created with.

Returns the sharing the buffer was created with.

Returns the external memory handle types that are supported with this buffer.

Locks the buffer in order to read its content from the host.

If the buffer is currently used in exclusive mode by the device, this function will return an error. Similarly if you called write() on the buffer and haven’t dropped the lock, this function will return an error as well.

After this function successfully locks the buffer, any attempt to submit a command buffer that uses it in exclusive mode will fail. You can still submit this buffer for non-exclusive accesses (ie. reads).

Locks the buffer in order to write its content from the host.

If the buffer is currently in use by the device, this function will return an error. Similarly if you called read() on the buffer and haven’t dropped the lock, this function will return an error as well.

After this function successfully locks the buffer, any attempt to submit a command buffer that uses it and any attempt to call read() will return an error.

Trait Implementations

Formats the value using the given formatter. Read more
Returns the device that owns Self.
Feeds this value into the given Hasher. Read more
Feeds a slice of this type into the given Hasher. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more
The type of the object.
Returns the raw Vulkan handle of the object.

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.