pub struct TimeDrivenStream {
pub reference: StreamReference,
pub frequency: Quantity<dyn Dimension<M = Z0, L = Z0, I = Z0, J = Z0, N = Z0, T = NInt<UInt<UTerm, B1>>, Kind = dyn Kind, Th = Z0>, dyn Units<Ratio<i64>, amount_of_substance = mole, length = meter, electric_current = ampere, luminous_intensity = candela, mass = kilogram, thermodynamic_temperature = kelvin, time = second>, Ratio<i64>>,
pub locality: PacingLocality,
}Expand description
Wrapper for output streams providing additional information specific to time-driven streams.
Fields§
§reference: StreamReferenceA reference to the stream that is specified.
frequency: Quantity<dyn Dimension<M = Z0, L = Z0, I = Z0, J = Z0, N = Z0, T = NInt<UInt<UTerm, B1>>, Kind = dyn Kind, Th = Z0>, dyn Units<Ratio<i64>, amount_of_substance = mole, length = meter, electric_current = ampere, luminous_intensity = candela, mass = kilogram, thermodynamic_temperature = kelvin, time = second>, Ratio<i64>>The evaluation frequency of the stream.
locality: PacingLocalityWhether the given frequency is relative to a dynamic spawn
Implementations§
Source§impl TimeDrivenStream
impl TimeDrivenStream
Sourcepub fn period(
&self,
) -> Quantity<dyn Dimension<M = Z0, L = Z0, I = Z0, J = Z0, N = Z0, T = PInt<UInt<UTerm, B1>>, Kind = dyn Kind, Th = Z0>, dyn Units<Ratio<i64>, amount_of_substance = mole, length = meter, electric_current = ampere, luminous_intensity = candela, mass = kilogram, thermodynamic_temperature = kelvin, time = second>, Ratio<i64>>
pub fn period( &self, ) -> Quantity<dyn Dimension<M = Z0, L = Z0, I = Z0, J = Z0, N = Z0, T = PInt<UInt<UTerm, B1>>, Kind = dyn Kind, Th = Z0>, dyn Units<Ratio<i64>, amount_of_substance = mole, length = meter, electric_current = ampere, luminous_intensity = candela, mass = kilogram, thermodynamic_temperature = kelvin, time = second>, Ratio<i64>>
Returns the evaluation period, i.e., the multiplicative inverse of TimeDrivenStream::frequency.
Sourcepub fn frequency(
&self,
) -> Quantity<dyn Dimension<M = Z0, L = Z0, I = Z0, J = Z0, N = Z0, T = NInt<UInt<UTerm, B1>>, Kind = dyn Kind, Th = Z0>, dyn Units<Ratio<i64>, amount_of_substance = mole, length = meter, electric_current = ampere, luminous_intensity = candela, mass = kilogram, thermodynamic_temperature = kelvin, time = second>, Ratio<i64>>
pub fn frequency( &self, ) -> Quantity<dyn Dimension<M = Z0, L = Z0, I = Z0, J = Z0, N = Z0, T = NInt<UInt<UTerm, B1>>, Kind = dyn Kind, Th = Z0>, dyn Units<Ratio<i64>, amount_of_substance = mole, length = meter, electric_current = ampere, luminous_intensity = candela, mass = kilogram, thermodynamic_temperature = kelvin, time = second>, Ratio<i64>>
Returns the evaluation frequency.
Sourcepub fn period_in_duration(&self) -> Duration
pub fn period_in_duration(&self) -> Duration
Returns the evaluation period, i.e., the multiplicative inverse of TimeDrivenStream::frequency, as Duration.
Trait Implementations§
Source§impl Clone for TimeDrivenStream
impl Clone for TimeDrivenStream
Source§fn clone(&self) -> TimeDrivenStream
fn clone(&self) -> TimeDrivenStream
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 TimeDrivenStream
impl Debug for TimeDrivenStream
Source§impl<'de> Deserialize<'de> for TimeDrivenStream
impl<'de> Deserialize<'de> for TimeDrivenStream
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<TimeDrivenStream, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<TimeDrivenStream, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for TimeDrivenStream
impl PartialEq for TimeDrivenStream
Source§impl Serialize for TimeDrivenStream
impl Serialize for TimeDrivenStream
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl Copy for TimeDrivenStream
impl Eq for TimeDrivenStream
impl StructuralPartialEq for TimeDrivenStream
Auto Trait Implementations§
impl Freeze for TimeDrivenStream
impl RefUnwindSafe for TimeDrivenStream
impl Send for TimeDrivenStream
impl Sync for TimeDrivenStream
impl Unpin for TimeDrivenStream
impl UnwindSafe for TimeDrivenStream
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.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