pub struct Scenario<T> { /* private fields */ }Expand description
One named scenario and its optional probability.
Implementations§
Source§impl<T> Scenario<T>
impl<T> Scenario<T>
pub const fn new(id: ScenarioId, probability: Option<f64>, value: T) -> Self
pub const fn id(&self) -> &ScenarioId
pub const fn probability(&self) -> Option<f64>
pub const fn value(&self) -> &T
pub fn into_value(self) -> T
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for Scenario<T>where
T: Freeze,
impl<T> RefUnwindSafe for Scenario<T>where
T: RefUnwindSafe,
impl<T> Send for Scenario<T>where
T: Send,
impl<T> Sync for Scenario<T>where
T: Sync,
impl<T> Unpin for Scenario<T>where
T: Unpin,
impl<T> UnsafeUnpin for Scenario<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for Scenario<T>where
T: UnwindSafe,
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