pub enum PlatonicSolid {
Tetrahedron,
Cube,
Octahedron,
Dodecahedron,
Icosahedron,
}Expand description
The five Platonic solids.
Variants§
Tetrahedron
Four triangular faces.
Cube
Six square faces.
Octahedron
Eight triangular faces.
Dodecahedron
Twelve pentagonal faces.
Icosahedron
Twenty triangular faces.
Implementations§
Source§impl PlatonicSolid
impl PlatonicSolid
Sourcepub const fn face_count(self) -> usize
pub const fn face_count(self) -> usize
Returns the number of faces.
Sourcepub const fn edge_count(self) -> usize
pub const fn edge_count(self) -> usize
Returns the number of edges.
Sourcepub const fn vertex_count(self) -> usize
pub const fn vertex_count(self) -> usize
Returns the number of vertices.
Sourcepub fn schlafli_symbol(self) -> SchlafliSymbol
pub fn schlafli_symbol(self) -> SchlafliSymbol
Returns the Schlafli symbol.
Trait Implementations§
Source§impl Clone for PlatonicSolid
impl Clone for PlatonicSolid
Source§fn clone(&self) -> PlatonicSolid
fn clone(&self) -> PlatonicSolid
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PlatonicSolid
impl Debug for PlatonicSolid
Source§impl PartialEq for PlatonicSolid
impl PartialEq for PlatonicSolid
Source§fn eq(&self, other: &PlatonicSolid) -> bool
fn eq(&self, other: &PlatonicSolid) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Copy for PlatonicSolid
impl Eq for PlatonicSolid
impl StructuralPartialEq for PlatonicSolid
Auto Trait Implementations§
impl Freeze for PlatonicSolid
impl RefUnwindSafe for PlatonicSolid
impl Send for PlatonicSolid
impl Sync for PlatonicSolid
impl Unpin for PlatonicSolid
impl UnsafeUnpin for PlatonicSolid
impl UnwindSafe for PlatonicSolid
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
Mutably borrows from an owned value. Read more