pub struct ResourceRecord {
pub resource_kind: u8,
pub handle: u32,
pub payload: Option<PayloadLocator>,
pub data_bytes: Vec<u8>,
}Expand description
One entry in the blob’s resource stream: a compiled resource addressed by its
dense per-kind handle, carried alongside the component stream. resource_kind
selects the per-kind table (ResourceKind as u8); handle is the dense index
within that kind (== the record’s position within its kind). A payload
resource (mesh, texture, audio clip) carries a PayloadLocator into the blob
payload section; a data resource (a baked Material) carries its runtime bytes
in data_bytes. Both fields are present so either shape round-trips; a given
kind uses one branch (AudioClip uses payload).
Fields§
§resource_kind: u8Which per-kind table this record belongs to (ResourceKind as u8).
handle: u32Dense index within that kind.
payload: Option<PayloadLocator>Where the compiled payload lives, for a payload resource.
data_bytes: Vec<u8>The runtime bytes, for a data resource.
Trait Implementations§
Source§impl Clone for ResourceRecord
impl Clone for ResourceRecord
Source§fn clone(&self) -> ResourceRecord
fn clone(&self) -> ResourceRecord
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more