pub trait TemperatureOrPressure<D: DualNum<f64> + Copy = f64>: Copy {
type Other: Copy;
const IDENTIFIER: &'static str;
// Required methods
fn temperature(&self) -> Option<Temperature<D>>;
fn pressure(&self) -> Option<Pressure<D>>;
fn temperature_pressure(
&self,
tp_init: Option<Self::Other>,
) -> (Option<Temperature<D>>, Option<Pressure<D>>, bool);
fn from_state<E: Residual<N, D>, N: Gradients>(
state: &State<E, N, D>,
) -> Self::Other
where DefaultAllocator: Allocator<N>;
fn linspace(
&self,
start: Self::Other,
end: Self::Other,
n: usize,
) -> (Temperature<Array1<f64>>, Pressure<Array1<f64>>);
}Expand description
Trait that enables functions to be generic over their input unit.
Required Associated Constants§
const IDENTIFIER: &'static str
Required Associated Types§
Required Methods§
fn temperature(&self) -> Option<Temperature<D>>
fn pressure(&self) -> Option<Pressure<D>>
fn temperature_pressure( &self, tp_init: Option<Self::Other>, ) -> (Option<Temperature<D>>, Option<Pressure<D>>, bool)
fn from_state<E: Residual<N, D>, N: Gradients>(
state: &State<E, N, D>,
) -> Self::Otherwhere
DefaultAllocator: Allocator<N>,
fn linspace( &self, start: Self::Other, end: Self::Other, n: usize, ) -> (Temperature<Array1<f64>>, Pressure<Array1<f64>>)
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.