pub struct Nose { /* private fields */ }Expand description
A nose cone. Its base takes the rocket’s diameter, unless it states its own, as a catalog
part does (Nose::from_catalog).
Implementations§
Source§impl Nose
impl Nose
Sourcepub fn from_catalog(part: &Part) -> Result<Self, Error>
pub fn from_catalog(part: &Part) -> Result<Self, Error>
The catalog nose cone part, as the module says: its base its own diameter, its
shoulder (if any) its own radius, named by its maker and number.
§Errors
Error::Catalog: CatalogProblem::Kind for a part of another kind,
CatalogProblem::UndefinedMaterial for one whose material its file doesn’t define,
CatalogProblem::NoWall for one neither filled nor given a wall,
CatalogProblem::Shape for a shape the builder doesn’t know,
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).
Source§impl Nose
impl Nose
Sourcepub fn hollow(
shape: NoseShape,
length_m: f64,
wall_m: f64,
material: Material,
) -> Self
pub fn hollow( shape: NoseShape, length_m: f64, wall_m: f64, material: Material, ) -> Self
A hollow nose cone of shape and length_m, with a wall wall_m thick.
Sourcepub fn solid(shape: NoseShape, length_m: f64, material: Material) -> Self
pub fn solid(shape: NoseShape, length_m: f64, material: Material) -> Self
A solid nose cone of shape and length_m.
Sourcepub fn with_shoulder(self, length_m: f64, wall_m: f64) -> Self
pub fn with_shoulder(self, length_m: f64, wall_m: f64) -> Self
The same nose with a shoulder, the sleeve behind its base that fits inside the tube
behind it: length_m long, wall_m thick, open at its aft end. Its outer radius is that
tube’s inner radius.
Sourcepub fn with_capped_shoulder(self, length_m: f64, wall_m: f64) -> Self
pub fn with_capped_shoulder(self, length_m: f64, wall_m: f64) -> Self
The same nose with a shoulder as Nose::with_shoulder makes it, closed at its aft end
by a disc as thick as its wall.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Nose
impl<'de> Deserialize<'de> for Nose
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 Nose
Auto Trait Implementations§
impl Freeze for Nose
impl RefUnwindSafe for Nose
impl Send for Nose
impl Sync for Nose
impl Unpin for Nose
impl UnsafeUnpin for Nose
impl UnwindSafe for Nose
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