Struct RiskLimit
pub struct RiskLimit { /* private fields */ }Expand description
A simple numeric risk limit threshold.
Implementations§
§impl RiskLimit
impl RiskLimit
pub fn new(measure: RiskMeasure, threshold: f64) -> Result<RiskLimit, RiskError>
pub fn new(measure: RiskMeasure, threshold: f64) -> Result<RiskLimit, RiskError>
Creates a risk limit with unknown level.
§Errors
Returns [RiskError] when threshold is not finite or is negative.
pub fn with_level(self, level: RiskLevel) -> RiskLimit
pub fn with_level(self, level: RiskLevel) -> RiskLimit
Sets descriptive risk level vocabulary.
pub const fn measure(&self) -> &RiskMeasure
pub const fn measure(&self) -> &RiskMeasure
Returns the risk measure.
Trait Implementations§
impl StructuralPartialEq for RiskLimit
Auto Trait Implementations§
impl Freeze for RiskLimit
impl RefUnwindSafe for RiskLimit
impl Send for RiskLimit
impl Sync for RiskLimit
impl Unpin for RiskLimit
impl UnsafeUnpin for RiskLimit
impl UnwindSafe for RiskLimit
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