[−][src]Enum mshio::mshfile::ElementType
Element types supported by the MSH file format
Based on Gmsh's GmshDefines.h header.
use mshio::mshfile::ElementType; use num_traits::FromPrimitive; use nom::lib::std::collections::HashMap; assert_eq!(ElementType::from_u8(1).unwrap(), ElementType::Lin2); assert_eq!(ElementType::from_u8(4).unwrap(), ElementType::Tet4); assert!(ElementType::from_u8(0).is_none()); assert!(ElementType::from_u8(141).is_none()); let elems: HashMap<_,_> = vec![(ElementType::Tet4, 2),(ElementType::Tri3, 10)].into_iter().collect();
Variants
Implementations
impl ElementType
[src]
pub fn nodes(&self) -> Result<usize, ()>
[src]
Returns the number of nodes per element of the given type
Not that for some Gmsh supported element types there is no fixed number of nodes per elements. This crate currently does not support parsing of such elements.
Trait Implementations
impl Clone for ElementType
[src]
fn clone(&self) -> ElementType
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for ElementType
[src]
impl Debug for ElementType
[src]
impl Eq for ElementType
[src]
impl FromPrimitive for ElementType
[src]
fn from_i64(n: i64) -> Option<Self>
[src]
fn from_u64(n: u64) -> Option<Self>
[src]
fn from_isize(n: isize) -> Option<Self>
[src]
fn from_i8(n: i8) -> Option<Self>
[src]
fn from_i16(n: i16) -> Option<Self>
[src]
fn from_i32(n: i32) -> Option<Self>
[src]
fn from_i128(n: i128) -> Option<Self>
[src]
fn from_usize(n: usize) -> Option<Self>
[src]
fn from_u8(n: u8) -> Option<Self>
[src]
fn from_u16(n: u16) -> Option<Self>
[src]
fn from_u32(n: u32) -> Option<Self>
[src]
fn from_u128(n: u128) -> Option<Self>
[src]
fn from_f32(n: f32) -> Option<Self>
[src]
fn from_f64(n: f64) -> Option<Self>
[src]
impl Hash for ElementType
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl PartialEq<ElementType> for ElementType
[src]
fn eq(&self, other: &ElementType) -> bool
[src]
#[must_use]fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
impl StructuralEq for ElementType
[src]
impl StructuralPartialEq for ElementType
[src]
Auto Trait Implementations
impl RefUnwindSafe for ElementType
impl Send for ElementType
impl Sync for ElementType
impl Unpin for ElementType
impl UnwindSafe for ElementType
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,
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.
fn to_owned(&self) -> T
[src]
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.
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>,