pub struct BufferCollectionInfo {
pub settings: Option<SingleBufferSettings>,
pub buffers: Option<Vec<VmoBuffer>>,
pub buffer_collection_id: Option<u64>,
/* private fields */
}Expand description
Information about a buffer collection and its buffers.
When adding fields to this table, see also fuchsia.sysmem2/Allocator.GetVmoInfo, redacted_buffer_collection_info, and RedactBufferCollectionInfo. Consider whether a client with only ZX_RIGHT_TRANSFER right on a sysmem vmo handle, calling GetVmoInfo, should be given the information in the new field, or whether it should be un-set during redaction. GetVmoInfo is analogous to zx_object_get_info with topic ZX_INFO_VMO, which doesn’t require the VMO handle to have any rights - just needs to be a handle to a VMO. Fields that are necessary to correctly use a single sysmem VMO in isolation are generally ok (but still think about it field by field). Fields that are not necessary to correctly use a single sysmem VMO in isolation should probably be redacted for GetVmoInfo redacted_buffer_collection_info.
Fields§
§settings: Option<SingleBufferSettings>These settings apply to all the buffers in the initial buffer allocation.
This field will always be set by sysmem.
buffers: Option<Vec<VmoBuffer>>VMO handles (and vmo_usable_start offset) for each buffer in the collection.
The size of this vector is the buffer_count (buffer_count is not sent separately).
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.
This field will always have VmoBuffer(s) in it, even if the participant specifies usage whieh does not require VMO handles. This permits such a participant to know the vmo_usable_start values, in case that’s of any use to the participant.
This field will always be set by sysmem, even if the participant doesn’t
specify any buffer usage (but the [fuchsia.sysmem2/VmoBuffer.vmo]
sub-field within this field won’t be set in that case).
In the response from [fuchsia.sysmem2/Allocator.GetVmoInfo], in the
redacted_buffer_collection_info, this field is un-set.
buffer_collection_id: Option<u64>This number is unique among all logical buffer collections per boot.
This ID number will be the same for all BufferCollectionToken(s), BufferCollection(s), and BufferCollectionTokenGroup(s) associated with the same logical buffer collection (derived from the same root token created with fuchsia.sysmem2.Allocator.CreateSharedCollection, or with CreateNonSharedCollection).
The same ID can be retrieved from a BufferCollectionToken, BufferCollection, or BufferCollectionTokenGroup using GetBufferCollectionId (at the cost of a round-trip to sysmem and back).
This field will always be set by sysmem.
Trait Implementations§
Source§impl Debug for BufferCollectionInfo
impl Debug for BufferCollectionInfo
Source§impl Decode<BufferCollectionInfo, DefaultFuchsiaResourceDialect> for BufferCollectionInfo
impl Decode<BufferCollectionInfo, DefaultFuchsiaResourceDialect> for BufferCollectionInfo
Source§impl Default for BufferCollectionInfo
impl Default for BufferCollectionInfo
Source§fn default() -> BufferCollectionInfo
fn default() -> BufferCollectionInfo
Source§impl Encode<BufferCollectionInfo, DefaultFuchsiaResourceDialect> for &mut BufferCollectionInfo
impl Encode<BufferCollectionInfo, DefaultFuchsiaResourceDialect> for &mut BufferCollectionInfo
Source§impl PartialEq for BufferCollectionInfo
impl PartialEq for BufferCollectionInfo
Source§fn eq(&self, other: &BufferCollectionInfo) -> bool
fn eq(&self, other: &BufferCollectionInfo) -> bool
self and other values to be equal, and is used by ==.Source§impl ResourceTypeMarker for BufferCollectionInfo
impl ResourceTypeMarker for BufferCollectionInfo
Source§type Borrowed<'a> = &'a mut BufferCollectionInfo
type Borrowed<'a> = &'a mut BufferCollectionInfo
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>
&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 BufferCollectionInfo
impl TypeMarker for BufferCollectionInfo
Source§type Owned = BufferCollectionInfo
type Owned = BufferCollectionInfo
Source§fn inline_align(_context: Context) -> usize
fn inline_align(_context: Context) -> usize
Source§fn inline_size(_context: Context) -> usize
fn inline_size(_context: Context) -> usize
inline_align.Source§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 moreSource§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.