pub trait SegmentCount {
type Count: Copy + ValueInto<f64>;
// Required methods
fn identifier(&self) -> Cow<'_, Identifier>;
fn segment_count(&self) -> Cow<'_, HashMap<String, Self::Count>>;
// Provided method
fn segment_map<M: Clone>(
&self,
segment_records: &[SegmentRecord<M>],
) -> Result<HashMap<SegmentRecord<M>, Self::Count>, ParameterError> { ... }
}
Expand description
Trait that enables parameter generation from generic molecular representations.
Required Associated Types§
Required Methods§
fn identifier(&self) -> Cow<'_, Identifier>
Provided Methods§
Sourcefn segment_map<M: Clone>(
&self,
segment_records: &[SegmentRecord<M>],
) -> Result<HashMap<SegmentRecord<M>, Self::Count>, ParameterError>
fn segment_map<M: Clone>( &self, segment_records: &[SegmentRecord<M>], ) -> Result<HashMap<SegmentRecord<M>, Self::Count>, ParameterError>
Count the number of occurences of each individual segment in the molecule.
The map contains the segment record as key and the count as value.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.