[][src]Struct llhd::value::TimeValue

pub struct TimeValue {
    pub time: BigRational,
    pub delta: usize,
    pub epsilon: usize,
}

A constant time value.

Fields

time: BigRational

The real time value, in seconds, as a rational number.

delta: usize

The number of delta steps.

epsilon: usize

The number of epsilon steps.

Methods

impl TimeValue[src]

pub fn new(time: BigRational, delta: usize, epsilon: usize) -> Self[src]

Create a new time.

pub fn zero() -> Self[src]

Create the zero time.

pub fn ty(&self) -> Type[src]

Get the type of the value.

pub fn time(&self) -> &BigRational[src]

Get the physical time of the time.

pub fn delta(&self) -> usize[src]

Get the delta time of the time.

pub fn epsilon(&self) -> usize[src]

Get the epsilon time of the time.

pub fn is_zero(&self) -> bool[src]

Check whether all components of this time are zero.

Trait Implementations

impl Clone for TimeValue[src]

impl Debug for TimeValue[src]

impl<'de> Deserialize<'de> for TimeValue[src]

impl Display for TimeValue[src]

impl Eq for TimeValue[src]

impl From<TimeValue> for Value[src]

impl Hash for TimeValue[src]

impl Ord for TimeValue[src]

impl PartialEq<TimeValue> for TimeValue[src]

impl PartialOrd<TimeValue> for TimeValue[src]

impl Serialize for TimeValue[src]

impl StructuralEq for TimeValue[src]

impl StructuralPartialEq for TimeValue[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.