pub struct Asset {
pub id: String,
pub path: String,
pub asset_type: String,
pub alt: Option<String>,
pub title: Option<String>,
}Expand description
Represents an embedded asset within an MDZ archive.
Assets are stored in the manifest.json file and reference actual files within the archive’s assets/ directory.
§Examples
{
"id": "image1",
"path": "assets/images/image1.png",
"type": "image",
"alt": "Example image",
"title": "A sample image"
}Fields§
§id: StringUnique identifier for the asset, used for internal reference
path: StringRelative path to the asset file within the MDZ archive
asset_type: StringType of the asset (image, video, audio, file)
alt: Option<String>Alt text for images (accessibility)
title: Option<String>Title or description of the asset
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Asset
impl<'de> Deserialize<'de> for Asset
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 Asset
impl RefUnwindSafe for Asset
impl Send for Asset
impl Sync for Asset
impl Unpin for Asset
impl UnwindSafe for Asset
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