pub struct ResourceEntry {
pub payload: Option<PayloadLocator>,
pub data_bytes: Vec<u8>,
}Expand description
One loaded resource’s runtime form. A payload resource (audio clip, and later
meshes / textures) carries a PayloadLocator into the blob payload section; a
data resource (a baked Material) carries its runtime bytes in data_bytes.
Fields§
§payload: Option<PayloadLocator>Where the compiled payload lives, for a payload resource.
data_bytes: Vec<u8>The runtime bytes, for a data resource.
Implementations§
Source§impl ResourceEntry
impl ResourceEntry
Sourcepub fn baked(payload_bytes: Vec<u8>) -> Self
pub fn baked(payload_bytes: Vec<u8>) -> Self
A payload resource the world baked for itself at start, holding its bytes directly because no blob backs them.
Sourcepub fn baked_bytes(&self) -> Option<&[u8]>
pub fn baked_bytes(&self) -> Option<&[u8]>
The payload bytes this entry holds directly, for one baked at start.
None for a build-compiled resource, whose bytes are read through its
PayloadLocator instead.
Trait Implementations§
Source§impl Clone for ResourceEntry
impl Clone for ResourceEntry
Source§fn clone(&self) -> ResourceEntry
fn clone(&self) -> ResourceEntry
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ResourceEntry
impl Debug for ResourceEntry
Source§impl Default for ResourceEntry
impl Default for ResourceEntry
Source§fn default() -> ResourceEntry
fn default() -> ResourceEntry
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ResourceEntry
impl RefUnwindSafe for ResourceEntry
impl Send for ResourceEntry
impl Sync for ResourceEntry
impl Unpin for ResourceEntry
impl UnsafeUnpin for ResourceEntry
impl UnwindSafe for ResourceEntry
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