Struct BufferUsage
pub struct BufferUsage {
pub none: Option<u32>,
pub cpu: Option<u32>,
pub vulkan: Option<u32>,
pub display: Option<u32>,
pub video: Option<u32>,
/* private fields */
}
Expand description
Describes how a client will access the contents of a buffer.
Fields§
§none: Option<u32>
If the client sets this field, the client should not set any other
fields in the same table instance. The only valid bit in this field is
NONE_USAGE
which must be set if this field is set. The point of this
field and the one bit set in this field is to essentially prove that the
client really means they aren’t going to use the buffers, so don’t need
any VMOs (didn’t just fail to fill out the table).
cpu: Option<u32>
If set, holds CPU usage bits. See CPU_USAGE_*
flags in usages.fidl.
vulkan: Option<u32>
If set, holds vulkan usage bits. See VULKAN_IMAGE_*
and
VULKAN_BUFFER_*
bits in usages.fidl. The VULKAN_USAGE_*
bit
definitions/names are deprecated.
display: Option<u32>
If set, holds display usage bits. See DISPLAY_USAGE_*
bits in
usages.fidl.
video: Option<u32>
If set, holds video usage bits. See VIDEO_USAGE_*
bits in usages.fidl.
Trait Implementations§
§impl Clone for BufferUsage
impl Clone for BufferUsage
§fn clone(&self) -> BufferUsage
fn clone(&self) -> BufferUsage
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more§impl Debug for BufferUsage
impl Debug for BufferUsage
§impl<D> Decode<BufferUsage, D> for BufferUsagewhere
D: ResourceDialect,
impl<D> Decode<BufferUsage, D> for BufferUsagewhere
D: ResourceDialect,
§fn new_empty() -> BufferUsage
fn new_empty() -> BufferUsage
Self
. The specific value does not matter,
since it will be overwritten by decode
.§impl Default for BufferUsage
impl Default for BufferUsage
§fn default() -> BufferUsage
fn default() -> BufferUsage
§impl<D> Encode<BufferUsage, D> for &BufferUsagewhere
D: ResourceDialect,
impl<D> Encode<BufferUsage, D> for &BufferUsagewhere
D: ResourceDialect,
§impl PartialEq for BufferUsage
impl PartialEq for BufferUsage
§impl TypeMarker for BufferUsage
impl TypeMarker for BufferUsage
§type Owned = BufferUsage
type Owned = BufferUsage
§fn inline_align(_context: Context) -> usize
fn inline_align(_context: Context) -> usize
§fn inline_size(_context: Context) -> usize
fn inline_size(_context: Context) -> usize
inline_align
.§fn encode_is_copy() -> bool
fn encode_is_copy() -> bool
Self::Owned
matches the FIDL wire
format and encoding requires no validation. When true, we can optimize
encoding arrays and vectors of Self::Owned
to a single memcpy. Read more§fn decode_is_copy() -> bool
fn decode_is_copy() -> bool
Self::Owned
matches the FIDL wire
format and decoding requires no validation. When true, we can optimize
decoding arrays and vectors of Self::Owned
to a single memcpy.§impl ValueTypeMarker for BufferUsage
impl ValueTypeMarker for BufferUsage
§type Borrowed<'a> = &'a BufferUsage
type Borrowed<'a> = &'a BufferUsage
Encode<Self>
type cheaply obtainable from &Self::Owned
. There are three cases: Read more§fn borrow(
value: &<BufferUsage as TypeMarker>::Owned,
) -> <BufferUsage as ValueTypeMarker>::Borrowed<'_>
fn borrow( value: &<BufferUsage as TypeMarker>::Owned, ) -> <BufferUsage as ValueTypeMarker>::Borrowed<'_>
&Self::Owned
to Self::Borrowed
.