pub struct FactorExposure { /* private fields */ }Expand description
A factor exposure value.
Implementations§
Source§impl FactorExposure
impl FactorExposure
Sourcepub fn new(factor: FactorName, value: f64) -> Result<Self, FactorError>
pub fn new(factor: FactorName, value: f64) -> Result<Self, FactorError>
Creates a factor exposure from a factor and finite value.
§Errors
Returns FactorError::NonFiniteValue when value is not finite.
Sourcepub const fn factor(&self) -> &FactorName
pub const fn factor(&self) -> &FactorName
Returns the factor name.
Trait Implementations§
Source§impl Clone for FactorExposure
impl Clone for FactorExposure
Source§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 moreSource§impl Debug for FactorExposure
impl Debug for FactorExposure
Source§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