Struct PortfolioWeight
pub struct PortfolioWeight { /* private fields */ }Expand description
A finite portfolio weight value.
Implementations§
§impl PortfolioWeight
impl PortfolioWeight
pub const fn new(value: f64) -> Result<PortfolioWeight, PortfolioWeightError>
pub const fn new(value: f64) -> Result<PortfolioWeight, PortfolioWeightError>
Creates a portfolio weight from a finite f64.
Negative values are accepted for short-exposure vocabulary.
§Errors
Returns [PortfolioWeightError::NonFiniteWeight] when value is not finite.
Trait Implementations§
§impl Clone for PortfolioWeight
impl Clone for PortfolioWeight
§fn clone(&self) -> PortfolioWeight
fn clone(&self) -> PortfolioWeight
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 PortfolioWeight
impl Debug for PortfolioWeight
§impl Display for PortfolioWeight
impl Display for PortfolioWeight
§impl PartialEq for PortfolioWeight
impl PartialEq for PortfolioWeight
§impl PartialOrd for PortfolioWeight
impl PartialOrd for PortfolioWeight
impl Copy for PortfolioWeight
impl StructuralPartialEq for PortfolioWeight
Auto Trait Implementations§
impl Freeze for PortfolioWeight
impl RefUnwindSafe for PortfolioWeight
impl Send for PortfolioWeight
impl Sync for PortfolioWeight
impl Unpin for PortfolioWeight
impl UnsafeUnpin for PortfolioWeight
impl UnwindSafe for PortfolioWeight
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