pub struct SammAspectModel {
pub aspects: Vec<SammAspect>,
pub properties: Vec<SammPhysicsProperty>,
pub prefix_map: HashMap<String, String>,
}Expand description
Complete parsed SAMM Aspect model ready for bridging to physics simulations.
Fields§
§aspects: Vec<SammAspect>Aspect nodes found in the TTL.
properties: Vec<SammPhysicsProperty>All properties (across all aspects).
prefix_map: HashMap<String, String>Namespace prefix map extracted from the TTL preamble.
Implementations§
Source§impl SammAspectModel
impl SammAspectModel
Sourcepub fn property_by_name(&self, name: &str) -> Option<&SammPhysicsProperty>
pub fn property_by_name(&self, name: &str) -> Option<&SammPhysicsProperty>
Look up a property by its local name (case-insensitive).
Sourcepub fn numeric_properties(&self) -> impl Iterator<Item = &SammPhysicsProperty>
pub fn numeric_properties(&self) -> impl Iterator<Item = &SammPhysicsProperty>
Return all numeric properties (Double / Integer data types).
Sourcepub fn measured_properties(&self) -> impl Iterator<Item = &SammPhysicsProperty>
pub fn measured_properties(&self) -> impl Iterator<Item = &SammPhysicsProperty>
Return all properties that have a known physical unit.
Trait Implementations§
Source§impl Clone for SammAspectModel
impl Clone for SammAspectModel
Source§fn clone(&self) -> SammAspectModel
fn clone(&self) -> SammAspectModel
Returns a duplicate of the value. Read more
1.0.0 · 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 SammAspectModel
impl Debug for SammAspectModel
Source§impl<'de> Deserialize<'de> for SammAspectModel
impl<'de> Deserialize<'de> for SammAspectModel
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>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for SammAspectModel
impl RefUnwindSafe for SammAspectModel
impl Send for SammAspectModel
impl Sync for SammAspectModel
impl Unpin for SammAspectModel
impl UnsafeUnpin for SammAspectModel
impl UnwindSafe for SammAspectModel
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
Converts
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>
Converts
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