Enum structural_shapes::StructuralShape [−][src]
This enum contains different structural shapes
Variants (Non-exhaustive)
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
This is a pipe with an outer_radius and a thickness
This is an I-Beam, with a width, height, web thickness, and flange thickness
Fields of IBeam
This is a box beam with a width, height, and thickness
Fields of BoxBeam
This is a rod with a radius only
Fields of Rod
radius: f64Radius of the road
This is a solid rectangular with width and height
Implementations
impl StructuralShape[src]
pub fn moment_of_inertia_x(&self) -> f64[src]
This function returns the moment of inertia of the structural shape around the x-axis
use structural_shapes::StructuralShape; let shape = StructuralShape::Rod{radius: 2.0}; let area = shape.moment_of_inertia_x();
pub fn moment_of_inertia_y(&self) -> f64[src]
This function returns the moment of inertia of hte structural shape around the y-axis
use structural_shapes::StructuralShape; let shape = StructuralShape::Rod{radius: 2.0}; let area = shape.moment_of_inertia_y();
pub fn area(&self) -> f64[src]
This function returns the cross-sectional area of the structural shape
use structural_shapes::StructuralShape; let shape = StructuralShape::Rod{radius: 2.0}; let area = shape.area();
Trait Implementations
impl Clone for StructuralShape[src]
fn clone(&self) -> StructuralShape[src]
pub fn clone_from(&mut self, source: &Self)1.0.0[src]
impl Copy for StructuralShape[src]
Auto Trait Implementations
impl RefUnwindSafe for StructuralShape[src]
impl Send for StructuralShape[src]
impl Sync for StructuralShape[src]
impl Unpin for StructuralShape[src]
impl UnwindSafe for StructuralShape[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn clone_into(&self, target: &mut T)[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,