pub struct Fitting { /* private fields */ }Expand description
A part fitted to the last body tube: a coupler, a centering ring, a bulkhead, a launch lug,
or a packed parachute or streamer. It sits flush with the tube’s aft end unless placed
elsewhere with Fitting::at.
A coupler, a ring or a bulkhead goes inside the tube; a launch lug on its outside. A
parachute or a streamer from a catalog is its mass, packed into a point; its drag is a
recovery device (super::Rocket::add_parachute).
Implementations§
Source§impl Fitting
impl Fitting
Sourcepub fn coupler(
length_m: f64,
outer_diameter_m: f64,
wall_m: f64,
material: Material,
) -> Self
pub fn coupler( length_m: f64, outer_diameter_m: f64, wall_m: f64, material: Material, ) -> Self
A tube inside the body tube, length_m long, outer_diameter_m across, with a wall
wall_m thick: a coupler joining two tubes, or an engine block.
Sourcepub fn centering_ring(
length_m: f64,
outer_diameter_m: f64,
inner_diameter_m: f64,
material: Material,
) -> Self
pub fn centering_ring( length_m: f64, outer_diameter_m: f64, inner_diameter_m: f64, material: Material, ) -> Self
A centering ring length_m thick, outer_diameter_m across with a hole
inner_diameter_m across.
Sourcepub fn bulkhead(length_m: f64, diameter_m: f64, material: Material) -> Self
pub fn bulkhead(length_m: f64, diameter_m: f64, material: Material) -> Self
A bulkhead: a solid disc length_m thick and diameter_m across.
Sourcepub fn launch_lug(
length_m: f64,
outer_diameter_m: f64,
wall_m: f64,
material: Material,
) -> Self
pub fn launch_lug( length_m: f64, outer_diameter_m: f64, wall_m: f64, material: Material, ) -> Self
A launch lug on the outside of the tube, length_m long, outer_diameter_m across, with
a wall wall_m thick.
Sourcepub fn from_catalog(part: &Part) -> Result<Self, Error>
pub fn from_catalog(part: &Part) -> Result<Self, Error>
The catalog part part, a tube coupler, engine block, centering ring, bulkhead, launch
lug, parachute or streamer, as the module says, named by its maker and number.
An engine block is a coupler; a parachute’s or streamer’s packing is a point.
§Errors
Error::Catalog: CatalogProblem::Kind for a part of another kind,
CatalogProblem::UndefinedMaterial for one whose material its file doesn’t define,
CatalogProblem::NoVolume for one that states a mass but has no volume to hold it;
Error::Domain for a stated mass that is negative or not finite; and Error::Design
for one that states a mass but whose sizes can’t be weighed, such as a bore no narrower
than its outside (a part that states no mass is refused for that when it is added).
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Fitting
impl<'de> Deserialize<'de> for Fitting
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>,
impl StructuralPartialEq for Fitting
Auto Trait Implementations§
impl Freeze for Fitting
impl RefUnwindSafe for Fitting
impl Send for Fitting
impl Sync for Fitting
impl Unpin for Fitting
impl UnsafeUnpin for Fitting
impl UnwindSafe for Fitting
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more