[][src]Enum dqcsim::host::configuration::Timeout

pub enum Timeout {
    Duration(Duration),
    Infinite,
}

Represents a timeout parameter, which may be infinite.

Variants

Duration(Duration)

The duration specifies the maximum timeout.

Infinite

The timeout is infinite.

Methods

impl Timeout[src]

pub fn from_seconds(seconds: u64) -> Timeout[src]

Creates a timeout from an integer time in seconds.

pub fn from_millis(millis: u64) -> Timeout[src]

Creates a timeout from an integer time in milliseconds.

pub fn infinite() -> Timeout[src]

Creates an infinite timeout.

pub fn try_from_double(t: f64) -> Result<Timeout>[src]

Creates a timeout from an floating point time in seconds.

Floating point infinity is used to specify infinite timeouts. This function fails when the specified time is negative.

pub fn to_double(&self) -> f64[src]

Returns the timeout as a floating point time in seconds.

Floating point infinity is used to specify infinite timeouts.

Trait Implementations

impl PartialEq<Timeout> for Timeout[src]

impl Copy for Timeout[src]

impl<'_> Into<Option<Duration>> for &'_ Timeout[src]

impl Clone for Timeout[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Debug for Timeout[src]

impl Display for Timeout[src]

fn fmt(&self, f: &mut Formatter) -> Result[src]

Turns the Timeout object into a string representation that can be parsed by from_str().

impl FromStr for Timeout[src]

type Err = Error

The associated error which can be returned from parsing.

fn from_str(s: &str) -> Result<Self, Self::Err>[src]

Constructs a Timeout from its string representation.

The string must either be "infinit[ey]" (or any case-insensitive substring thereof) or a time value, which consists of either a floating point number of seconds or one or more integers suffixed by "h" (hours), "m" (minutes), "s" (seconds), or "ms" (milliseconds) which are added together.

impl Serialize for Timeout[src]

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

Auto Trait Implementations

impl Send for Timeout

impl Unpin for Timeout

impl Sync for Timeout

impl UnwindSafe for Timeout

impl RefUnwindSafe for Timeout

Blanket Implementations

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

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

type Owned = T

The resulting type after obtaining ownership.

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

impl<T, U> Into<U> for T where
    U: From<T>, 
[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.

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

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

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

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

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,