pub struct Material {
pub id: MaterialId,
pub kind: MaterialKind,
pub title: Option<String>,
pub description: Option<String>,
}Expand description
A resolved material with its source.
Fields§
§id: MaterialIdMaterial identifier.
kind: MaterialKindWhat kind of material and its resolved source/identifier.
title: Option<String>Optional human-readable title for display (falls back to material ID).
description: Option<String>Human-readable description.
Implementations§
Source§impl Material
impl Material
Sourcepub fn display_name(&self) -> &str
pub fn display_name(&self) -> &str
Get the display name for this material (title or ID).
Sourcepub fn is_digital(&self) -> bool
pub fn is_digital(&self) -> bool
Whether this is a digital material.
Sourcepub fn is_physical(&self) -> bool
pub fn is_physical(&self) -> bool
Whether this is a physical material.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Material
impl RefUnwindSafe for Material
impl Send for Material
impl Sync for Material
impl Unpin for Material
impl UnsafeUnpin for Material
impl UnwindSafe for Material
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