pub struct Component {
pub id: String,
pub name: String,
pub part: Part,
pub position: Option<Position>,
pub auto: Vec<AutoDimension>,
pub motor_mount: Option<MotorMount>,
pub finish: Option<Finish>,
pub overrides: Overrides,
pub overrides_include_children: bool,
pub drag_override: Option<DragOverride>,
pub children: Vec<Component>,
}Expand description
A node of the design tree: a part, where it sits, and what hangs off it.
Fields§
§id: StringUnique id.
name: StringName.
part: PartThe part, with its geometry and material.
position: Option<Position>Where an attached part sits along its parent. Body components (a stage’s own list) have none: they stack.
auto: Vec<AutoDimension>Dimensions taken from neighbours or the parent instead of the part’s stored values.
motor_mount: Option<MotorMount>Makes a body tube or an inner tube a motor mount.
finish: Option<Finish>The outer surface’s finish, for skin friction; None means Finish::default. Parts
inside the body ignore it.
overrides: OverridesMass, center-of-mass and inertia overrides.
overrides_include_children: boolWhether the overrides replace this component together with everything attached to it
(true), or this component alone (false).
drag_override: Option<DragOverride>A drag coefficient stated in place of the drag the component’s geometry gives
(DragOverride).
children: Vec<Component>Attached parts, or a pod set’s body components.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Component
impl<'de> Deserialize<'de> for Component
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>,
Source§impl JsonSchema for Component
impl JsonSchema for Component
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read more