#[non_exhaustive]pub struct Part {
pub file: String,
pub manufacturer: String,
pub part_number: String,
pub description: String,
pub mass_kg: Option<f64>,
pub kind: PartKind,
}Expand description
One part as its catalog lists it.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.file: StringThe catalog file it came from, such as estes_classic.orc.
manufacturer: StringThe maker, as the file writes it.
part_number: StringThe maker’s part number, as the file writes it.
description: StringThe file’s description; empty if it has none. A part that states two keeps the last, as OpenRocket does.
mass_kg: Option<f64>The part’s mass as the file states it, kg; None for most parts, whose mass follows from
their size and material.
kind: PartKindWhat kind of part, with its dimensions.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Part
impl<'de> Deserialize<'de> for Part
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 Part
Auto Trait Implementations§
impl Freeze for Part
impl RefUnwindSafe for Part
impl Send for Part
impl Sync for Part
impl Unpin for Part
impl UnsafeUnpin for Part
impl UnwindSafe for Part
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