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 moreSource§impl Debug for ResourceRecord
impl Debug for ResourceRecord
Source§impl<'de> Deserialize<'de> for ResourceRecord
impl<'de> Deserialize<'de> for ResourceRecord
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ResourceRecord, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ResourceRecord, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for ResourceRecord
impl PartialEq for ResourceRecord
Source§impl Serialize for ResourceRecord
impl Serialize for ResourceRecord
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl StructuralPartialEq for ResourceRecord
Auto Trait Implementations§
impl Freeze for ResourceRecord
impl RefUnwindSafe for ResourceRecord
impl Send for ResourceRecord
impl Sync for ResourceRecord
impl Unpin for ResourceRecord
impl UnsafeUnpin for ResourceRecord
impl UnwindSafe for ResourceRecord
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more