Struct FactorExposure
pub struct FactorExposure { /* private fields */ }Expand description
A factor exposure value.
Implementations§
§impl FactorExposure
impl FactorExposure
pub fn new(
factor: FactorName,
value: f64,
) -> Result<FactorExposure, FactorError>
pub fn new( factor: FactorName, value: f64, ) -> Result<FactorExposure, FactorError>
Creates a factor exposure from a factor and finite value.
§Errors
Returns [FactorError::NonFiniteValue] when value is not finite.
pub const fn factor(&self) -> &FactorName
pub const fn factor(&self) -> &FactorName
Returns the factor name.
Trait Implementations§
§impl Clone for FactorExposure
impl Clone for FactorExposure
§fn clone(&self) -> FactorExposure
fn clone(&self) -> FactorExposure
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read more§impl Debug for FactorExposure
impl Debug for FactorExposure
§impl PartialEq for FactorExposure
impl PartialEq for FactorExposure
impl StructuralPartialEq for FactorExposure
Auto Trait Implementations§
impl Freeze for FactorExposure
impl RefUnwindSafe for FactorExposure
impl Send for FactorExposure
impl Sync for FactorExposure
impl Unpin for FactorExposure
impl UnsafeUnpin for FactorExposure
impl UnwindSafe for FactorExposure
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