pub struct MotorTube { /* private fields */ }Expand description
The tube inside the airframe that holds the motor, flush with the last body tube’s aft end
unless placed elsewhere with MotorTube::at.
Implementations§
Source§impl MotorTube
impl MotorTube
Sourcepub fn from_catalog(part: &Part) -> Result<Self, Error>
pub fn from_catalog(part: &Part) -> Result<Self, Error>
The catalog body tube part as the motor tube: its length, bore and wall, named by its
maker and number. A catalog tube is often sold longer than it is flown:
MotorTube::with_length_m cuts it.
§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).
Sourcepub fn with_length_m(self, length_m: f64) -> Self
pub fn with_length_m(self, length_m: f64) -> Self
The same tube cut to length_m. A catalog tube that states its mass keeps the density
that gives it that mass, so a cut weighs its share.
Source§impl MotorTube
impl MotorTube
Sourcepub fn new(
length_m: f64,
inner_diameter_m: f64,
wall_m: f64,
material: Material,
) -> Self
pub fn new( length_m: f64, inner_diameter_m: f64, wall_m: f64, material: Material, ) -> Self
A motor tube length_m long, with a bore of inner_diameter_m and a wall wall_m thick.
Sourcepub fn with_overhang_m(self, overhang_m: f64) -> Self
pub fn with_overhang_m(self, overhang_m: f64) -> Self
The same tube with the motor’s aft end overhang_m past the tube’s.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for MotorTube
impl<'de> Deserialize<'de> for MotorTube
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 MotorTube
Auto Trait Implementations§
impl Freeze for MotorTube
impl RefUnwindSafe for MotorTube
impl Send for MotorTube
impl Sync for MotorTube
impl Unpin for MotorTube
impl UnsafeUnpin for MotorTube
impl UnwindSafe for MotorTube
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