Struct screen_13::driver::buffer::BufferInfo
source · pub struct BufferInfo {
pub alignment: DeviceSize,
pub size: DeviceSize,
pub usage: BufferUsageFlags,
pub can_map: bool,
}Expand description
Information used to create a Buffer instance.
Fields§
§alignment: DeviceSizeByte alignment of the base device address of the buffer.
Must be a power of two.
size: DeviceSizeSize in bytes of the buffer to be created.
usage: BufferUsageFlagsA bitmask of specifying allowed usages of the buffer.
can_map: boolSpecifies a buffer whose memory is host visible and may be mapped.
Implementations§
source§impl BufferInfo
impl BufferInfo
sourcepub fn new(size: DeviceSize, usage: BufferUsageFlags) -> BufferInfoBuilder
pub fn new(size: DeviceSize, usage: BufferUsageFlags) -> BufferInfoBuilder
Specifies a non-mappable buffer with the given size and usage values.
sourcepub fn new_mappable(
size: DeviceSize,
usage: BufferUsageFlags
) -> BufferInfoBuilder
pub fn new_mappable( size: DeviceSize, usage: BufferUsageFlags ) -> BufferInfoBuilder
Specifies a mappable buffer with the given size and usage values.
Note
For convenience the given usage value will be bitwise OR’d with
TRANSFER_DST | TRANSFER_SRC.
Trait Implementations§
source§impl Clone for BufferInfo
impl Clone for BufferInfo
source§fn clone(&self) -> BufferInfo
fn clone(&self) -> BufferInfo
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl Debug for BufferInfo
impl Debug for BufferInfo
source§impl From<BufferInfo> for BufferSubresource
impl From<BufferInfo> for BufferSubresource
source§fn from(info: BufferInfo) -> Self
fn from(info: BufferInfo) -> Self
Converts to this type from the input type.
source§impl From<BufferInfoBuilder> for BufferInfo
impl From<BufferInfoBuilder> for BufferInfo
source§fn from(info: BufferInfoBuilder) -> Self
fn from(info: BufferInfoBuilder) -> Self
Converts to this type from the input type.
source§impl Hash for BufferInfo
impl Hash for BufferInfo
source§impl PartialEq<BufferInfo> for BufferInfo
impl PartialEq<BufferInfo> for BufferInfo
source§fn eq(&self, other: &BufferInfo) -> bool
fn eq(&self, other: &BufferInfo) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl Pool<BufferInfo, Buffer> for HashPool
impl Pool<BufferInfo, Buffer> for HashPool
source§fn lease(&mut self, info: BufferInfo) -> Result<Lease<Buffer>, DriverError>
fn lease(&mut self, info: BufferInfo) -> Result<Lease<Buffer>, DriverError>
Lease a resource.
source§impl Pool<BufferInfo, Buffer> for LazyPool
impl Pool<BufferInfo, Buffer> for LazyPool
source§fn lease(&mut self, info: BufferInfo) -> Result<Lease<Buffer>, DriverError>
fn lease(&mut self, info: BufferInfo) -> Result<Lease<Buffer>, DriverError>
Lease a resource.
impl Copy for BufferInfo
impl Eq for BufferInfo
impl StructuralEq for BufferInfo
impl StructuralPartialEq for BufferInfo
Auto Trait Implementations§
impl RefUnwindSafe for BufferInfo
impl Send for BufferInfo
impl Sync for BufferInfo
impl Unpin for BufferInfo
impl UnwindSafe for BufferInfo
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