pub struct BufferCollectionInfo2 {
pub buffer_count: u32,
pub settings: SingleBufferSettings,
pub buffers: [VmoBuffer; 64],
}
Expand description
Information about a buffer collection and its buffers.
Fields§
§buffer_count: u32
The total number of buffers.
settings: SingleBufferSettings
These settings apply to all the buffers in the initial buffer allocation.
buffers: [VmoBuffer; 64]
VMO handles (and vmo_usable_start offset) for each buffer in the collection.
If present, all the VMOs at or after index buffer_count
are invalid
(0) handles.
All buffer VMO handles have identical size and access rights. The size is in settings.buffer_settings.size_bytes.
The VMO access rights are determined based on the usages which the client specified when allocating the buffer collection. For example, a client which expressed a read-only usage will receive VMOs without write rights. In addition, the rights can be attenuated by the parameter to BufferCollectionToken.Duplicate() calls.
Trait Implementations§
Source§impl Debug for BufferCollectionInfo2
impl Debug for BufferCollectionInfo2
Source§impl Decode<BufferCollectionInfo2, DefaultFuchsiaResourceDialect> for BufferCollectionInfo2
impl Decode<BufferCollectionInfo2, DefaultFuchsiaResourceDialect> for BufferCollectionInfo2
Source§impl Encode<BufferCollectionInfo2, DefaultFuchsiaResourceDialect> for &mut BufferCollectionInfo2
impl Encode<BufferCollectionInfo2, DefaultFuchsiaResourceDialect> for &mut BufferCollectionInfo2
Source§impl<T0: Encode<u32, DefaultFuchsiaResourceDialect>, T1: Encode<SingleBufferSettings, DefaultFuchsiaResourceDialect>, T2: Encode<Array<VmoBuffer, 64>, DefaultFuchsiaResourceDialect>> Encode<BufferCollectionInfo2, DefaultFuchsiaResourceDialect> for (T0, T1, T2)
impl<T0: Encode<u32, DefaultFuchsiaResourceDialect>, T1: Encode<SingleBufferSettings, DefaultFuchsiaResourceDialect>, T2: Encode<Array<VmoBuffer, 64>, DefaultFuchsiaResourceDialect>> Encode<BufferCollectionInfo2, DefaultFuchsiaResourceDialect> for (T0, T1, T2)
Source§impl Hash for BufferCollectionInfo2
impl Hash for BufferCollectionInfo2
Source§impl Ord for BufferCollectionInfo2
impl Ord for BufferCollectionInfo2
Source§fn cmp(&self, other: &BufferCollectionInfo2) -> Ordering
fn cmp(&self, other: &BufferCollectionInfo2) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for BufferCollectionInfo2
impl PartialEq for BufferCollectionInfo2
Source§impl PartialOrd for BufferCollectionInfo2
impl PartialOrd for BufferCollectionInfo2
Source§impl ResourceTypeMarker for BufferCollectionInfo2
impl ResourceTypeMarker for BufferCollectionInfo2
Source§type Borrowed<'a> = &'a mut BufferCollectionInfo2
type Borrowed<'a> = &'a mut BufferCollectionInfo2
The Rust type to use for encoding. This is a particular
Encode<Self>
type cheaply obtainable from &mut Self::Owned
. There are three cases: Read moreSource§fn take_or_borrow<'a>(
value: &'a mut <Self as TypeMarker>::Owned,
) -> Self::Borrowed<'a>
fn take_or_borrow<'a>( value: &'a mut <Self as TypeMarker>::Owned, ) -> Self::Borrowed<'a>
Cheaply converts from
&mut Self::Owned
to Self::Borrowed
. For
HandleBased
types this is “take” (it returns an owned handle and
replaces value
with Handle::invalid
), and for all other types it is
“borrow” (just converts from one reference to another).Source§impl TypeMarker for BufferCollectionInfo2
impl TypeMarker for BufferCollectionInfo2
Source§type Owned = BufferCollectionInfo2
type Owned = BufferCollectionInfo2
The owned Rust type which this FIDL type decodes into.
Source§fn inline_align(_context: Context) -> usize
fn inline_align(_context: Context) -> usize
Returns the minimum required alignment of the inline portion of the
encoded object. It must be a (nonzero) power of two.
Source§fn inline_size(_context: Context) -> usize
fn inline_size(_context: Context) -> usize
Returns the size of the inline portion of the encoded object, including
padding for alignment. Must be a multiple of
inline_align
.§fn encode_is_copy() -> bool
fn encode_is_copy() -> bool
Returns true if the memory layout of
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
Returns true if the memory layout of
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 Eq for BufferCollectionInfo2
impl Standalone<DefaultFuchsiaResourceDialect> for BufferCollectionInfo2
impl StructuralPartialEq for BufferCollectionInfo2
Auto Trait Implementations§
impl Freeze for BufferCollectionInfo2
impl RefUnwindSafe for BufferCollectionInfo2
impl Send for BufferCollectionInfo2
impl Sync for BufferCollectionInfo2
impl Unpin for BufferCollectionInfo2
impl UnwindSafe for BufferCollectionInfo2
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