pub enum AssetSource {
Path(PathBuf),
Packed {
offset: u64,
size: u64,
},
}
Expand description
Represents the physical source of an asset’s data.
This enum allows the asset system to transparently handle assets from two different contexts:
- In editor/development mode, assets are loaded directly from loose files on disk (
Path
). - In release/standalone mode, assets are loaded from an optimized packfile (
Packed
).
Variants§
Path(PathBuf)
The asset is a loose file on disk. The PathBuf
points to the file.
Packed
The asset is located within a packfile.
Trait Implementations§
Source§impl Clone for AssetSource
impl Clone for AssetSource
Source§fn clone(&self) -> AssetSource
fn clone(&self) -> AssetSource
Returns a duplicate of the value. Read more
1.0.0 · 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 AssetSource
impl Debug for AssetSource
Source§impl<'de> Deserialize<'de> for AssetSource
impl<'de> Deserialize<'de> for AssetSource
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for AssetSource
impl RefUnwindSafe for AssetSource
impl Send for AssetSource
impl Sync for AssetSource
impl Unpin for AssetSource
impl UnwindSafe for AssetSource
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