pub struct Condition { /* private fields */ }Expand description
One simulation condition: named values in a fixed order.
Implementations§
Source§impl Condition
impl Condition
Sourcepub fn with(self, key: &str, value: impl Into<Value>) -> Condition
pub fn with(self, key: &str, value: impl Into<Value>) -> Condition
The same condition with key set to value (replaced if present).
Sourcepub fn set(&mut self, key: &str, value: impl Into<Value>)
pub fn set(&mut self, key: &str, value: impl Into<Value>)
Set key to value (replaced if present, appended otherwise).
Sourcepub fn f64(&self, key: &str) -> Result<f64>
pub fn f64(&self, key: &str) -> Result<f64>
The real number at key (integers are converted).
§Errors
Error::Condition if the key is missing or is not a number.
Sourcepub fn usize(&self, key: &str) -> Result<usize>
pub fn usize(&self, key: &str) -> Result<usize>
The non-negative integer at key.
§Errors
Error::Condition if the key is missing or is not a non-negative integer.
Trait Implementations§
impl StructuralPartialEq for Condition
Auto Trait Implementations§
impl Freeze for Condition
impl RefUnwindSafe for Condition
impl Send for Condition
impl Sync for Condition
impl Unpin for Condition
impl UnsafeUnpin for Condition
impl UnwindSafe for Condition
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<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