pub struct RawBundle<M> {
pub manifest: M,
pub resources: BTreeMap<PathBuf, ResourceBytes>,
}
Expand description
A manifest bundled together, optionally, with the Resources that it describes. The manifest may be of any format. This is useful for deserializing a bundle of an outdated format, so that it may be modified to fit the supported format.
Fields§
§manifest: M
The manifest describing the resources that compose this bundle.
resources: BTreeMap<PathBuf, ResourceBytes>
The full or partial resource data. Each entry must correspond to one of the Bundled Locations specified by the Manifest. Bundled Locations are always relative paths (relative to the root_dir).
Implementations§
source§impl<M: DeserializeOwned> RawBundle<M>
impl<M: DeserializeOwned> RawBundle<M>
sourcepub async fn read_from_file(path: &Path) -> MrBundleResult<Self>
pub async fn read_from_file(path: &Path) -> MrBundleResult<Self>
Load a Bundle into memory from a file
Trait Implementations§
source§impl<'de, M> Deserialize<'de> for RawBundle<M>where
M: DeserializeOwned,
impl<'de, M> Deserialize<'de> for RawBundle<M>where
M: DeserializeOwned,
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
source§impl<M: PartialEq> PartialEq for RawBundle<M>
impl<M: PartialEq> PartialEq for RawBundle<M>
impl<M: Eq> Eq for RawBundle<M>
impl<M> StructuralPartialEq for RawBundle<M>
Auto Trait Implementations§
impl<M> Freeze for RawBundle<M>where
M: Freeze,
impl<M> RefUnwindSafe for RawBundle<M>where
M: RefUnwindSafe,
impl<M> Send for RawBundle<M>where
M: Send,
impl<M> Sync for RawBundle<M>where
M: Sync,
impl<M> Unpin for RawBundle<M>where
M: Unpin,
impl<M> UnwindSafe for RawBundle<M>where
M: UnwindSafe,
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
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.