Struct feos_core::parameter::SegmentRecord
source · [−]pub struct SegmentRecord<M, I> {
pub identifier: String,
pub molarweight: f64,
pub model_record: M,
pub ideal_gas_record: Option<I>,
}
Expand description
Parameters describing an individual segment of a molecule.
Fields
identifier: String
molarweight: f64
model_record: M
ideal_gas_record: Option<I>
Implementations
sourceimpl<M, I> SegmentRecord<M, I>
impl<M, I> SegmentRecord<M, I>
sourcepub fn new(
identifier: String,
molarweight: f64,
model_record: M,
ideal_gas_record: Option<I>
) -> Self
pub fn new(
identifier: String,
molarweight: f64,
model_record: M,
ideal_gas_record: Option<I>
) -> Self
Creates a new SegmentRecord
.
sourcepub fn from_json<P: AsRef<Path>>(file: P) -> Result<Vec<Self>, ParameterError> where
I: DeserializeOwned,
M: DeserializeOwned,
pub fn from_json<P: AsRef<Path>>(file: P) -> Result<Vec<Self>, ParameterError> where
I: DeserializeOwned,
M: DeserializeOwned,
Read a list of SegmentRecord
s from a JSON file.
Trait Implementations
sourceimpl<M: Clone, I: Clone> Clone for SegmentRecord<M, I>
impl<M: Clone, I: Clone> Clone for SegmentRecord<M, I>
sourcefn clone(&self) -> SegmentRecord<M, I>
fn clone(&self) -> SegmentRecord<M, I>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl<M: Debug, I: Debug> Debug for SegmentRecord<M, I>
impl<M: Debug, I: Debug> Debug for SegmentRecord<M, I>
sourceimpl<'de, M, I> Deserialize<'de> for SegmentRecord<M, I> where
M: Deserialize<'de>,
I: Deserialize<'de>,
impl<'de, M, I> Deserialize<'de> for SegmentRecord<M, I> where
M: Deserialize<'de>,
I: Deserialize<'de>,
sourcefn 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
sourceimpl<M: Display, I: Display> Display for SegmentRecord<M, I>
impl<M: Display, I: Display> Display for SegmentRecord<M, I>
sourceimpl<M, I> Hash for SegmentRecord<M, I>
impl<M, I> Hash for SegmentRecord<M, I>
sourceimpl<M, I> PartialEq<SegmentRecord<M, I>> for SegmentRecord<M, I>
impl<M, I> PartialEq<SegmentRecord<M, I>> for SegmentRecord<M, I>
sourceimpl<M, I> Serialize for SegmentRecord<M, I> where
M: Serialize,
I: Serialize,
impl<M, I> Serialize for SegmentRecord<M, I> where
M: Serialize,
I: Serialize,
impl<M, I> Eq for SegmentRecord<M, I>
Auto Trait Implementations
impl<M, I> RefUnwindSafe for SegmentRecord<M, I> where
I: RefUnwindSafe,
M: RefUnwindSafe,
impl<M, I> Send for SegmentRecord<M, I> where
I: Send,
M: Send,
impl<M, I> Sync for SegmentRecord<M, I> where
I: Sync,
M: Sync,
impl<M, I> Unpin for SegmentRecord<M, I> where
I: Unpin,
M: Unpin,
impl<M, I> UnwindSafe for SegmentRecord<M, I> where
I: UnwindSafe,
M: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to key
and return true
if they are equal.
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more