Struct cobble_core::minecraft::models::AssetInfo
source · Expand description
Information of a single asset.
Fields§
§hash: String
SHA1 of the asset file.
size: usize
Size of the asset file.
Implementations§
source§impl AssetInfo
impl AssetInfo
sourcepub fn asset_path(&self, assets_path: impl AsRef<Path>) -> PathBuf
pub fn asset_path(&self, assets_path: impl AsRef<Path>) -> PathBuf
Builds the complete path for the asset file.
sourcepub fn relative_asset_path(&self) -> PathBuf
pub fn relative_asset_path(&self) -> PathBuf
Builds the path for the asset file relative to the assets folder.
sourcepub fn resource_path(key: &str, minecraft_path: impl AsRef<Path>) -> PathBuf
pub fn resource_path(key: &str, minecraft_path: impl AsRef<Path>) -> PathBuf
Builds the complete path for the asset file mapped as a resource.
sourcepub fn download_url(&self) -> String
pub fn download_url(&self) -> String
Builds the download URL for the asset.
Trait Implementations§
source§impl<'de> Deserialize<'de> for AssetInfo
impl<'de> Deserialize<'de> for AssetInfo
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