[−][src]Enum dqcsim::host::configuration::Timeout
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(&self) -> 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]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl<'de> Deserialize<'de> for Timeout
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
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]
T: Display + ?Sized,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> DeserializeOwned for T where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,