pub struct ProjectAssets { /* private fields */ }Expand description
Validated project icon and splash image bytes.
Implementations§
Source§impl ProjectAssets
impl ProjectAssets
Sourcepub fn load(project_dir: &Utf8Path) -> Result<Self, AssetError>
pub fn load(project_dir: &Utf8Path) -> Result<Self, AssetError>
Load assets/icon.png and assets/splash.png from a project.
§Errors
Returns a typed error when either file is missing, unsafe, oversized, unreadable, or not a structurally valid PNG.
Sourcepub const fn icon_metadata(&self) -> PngMetadata
pub const fn icon_metadata(&self) -> PngMetadata
Validated icon dimensions and color representation.
Sourcepub const fn splash_metadata(&self) -> PngMetadata
pub const fn splash_metadata(&self) -> PngMetadata
Validated splash dimensions and color representation.
Sourcepub fn fingerprint(&self) -> &str
pub fn fingerprint(&self) -> &str
Stable digest of both filenames and file contents.
Trait Implementations§
Source§impl Clone for ProjectAssets
impl Clone for ProjectAssets
Source§impl Debug for ProjectAssets
impl Debug for ProjectAssets
impl Eq for ProjectAssets
Source§impl PartialEq for ProjectAssets
impl PartialEq for ProjectAssets
impl StructuralPartialEq for ProjectAssets
Auto Trait Implementations§
impl Freeze for ProjectAssets
impl RefUnwindSafe for ProjectAssets
impl Send for ProjectAssets
impl Sync for ProjectAssets
impl Unpin for ProjectAssets
impl UnsafeUnpin for ProjectAssets
impl UnwindSafe for ProjectAssets
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