pub struct JsonMaterial {
pub name: String,
pub youngs_modulus: f64,
pub shear_modulus: f64,
pub poissons_ratio: f64,
pub density: f64,
pub thermal_expansion: f64,
pub yield_strength: f64,
pub ultimate_strength: f64,
pub color: Option<[u8; 3]>,
}Expand description
JSON material representation.
Fields§
§name: String§youngs_modulus: f64§shear_modulus: f64§poissons_ratio: f64§density: f64§thermal_expansion: f64§yield_strength: f64§ultimate_strength: f64§color: Option<[u8; 3]>Implementations§
Source§impl JsonMaterial
impl JsonMaterial
Sourcepub fn into_material(self) -> Material
pub fn into_material(self) -> Material
Convert to Material with owned name (no memory leak).
Trait Implementations§
Source§impl Clone for JsonMaterial
impl Clone for JsonMaterial
Source§impl Debug for JsonMaterial
impl Debug for JsonMaterial
Source§impl<'de> Deserialize<'de> for JsonMaterial
impl<'de> Deserialize<'de> for JsonMaterial
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 Forget for JsonMaterial
impl Freeze for JsonMaterial
impl Move for JsonMaterial
impl RefUnwindSafe for JsonMaterial
impl Send for JsonMaterial
impl Sync for JsonMaterial
impl Unpin for JsonMaterial
impl UnsafeUnpin for JsonMaterial
impl UnwindSafe for JsonMaterial
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