pub struct Material {
pub name: String,
pub brand: Option<String>,
pub family: Option<String>,
pub density_g_ml: Option<f64>,
pub color_rgba: Option<[u8; 4]>,
pub bottle_price: Option<f64>,
pub bottle_capacity_ml: Option<f64>,
pub extra: Map<String, Value>,
}Expand description
One entry of the material library.
Fields§
§name: StringMaterial name. Required and non-empty when the array is present.
brand: Option<String>Brand, e.g. DragonFruit.
family: Option<String>Family, e.g. standard.
density_g_ml: Option<f64>Density in grams per millilitre.
color_rgba: Option<[u8; 4]>Display color.
bottle_price: Option<f64>Bottle price, vendor metadata.
bottle_capacity_ml: Option<f64>Bottle capacity in millilitres, vendor metadata.
extra: Map<String, Value>Unknown keys, preserved verbatim.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Material
impl<'de> Deserialize<'de> for Material
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
impl StructuralPartialEq for Material
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