pub struct PortfolioWeight { /* private fields */ }Expand description
A finite portfolio weight value.
Implementations§
Source§impl PortfolioWeight
impl PortfolioWeight
Sourcepub 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§
Source§impl Clone for PortfolioWeight
impl Clone for PortfolioWeight
Source§fn clone(&self) -> PortfolioWeight
fn clone(&self) -> PortfolioWeight
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for PortfolioWeight
Source§impl Debug for PortfolioWeight
impl Debug for PortfolioWeight
Source§impl Display for PortfolioWeight
impl Display for PortfolioWeight
Source§impl PartialEq for PortfolioWeight
impl PartialEq for PortfolioWeight
Source§fn eq(&self, other: &PortfolioWeight) -> bool
fn eq(&self, other: &PortfolioWeight) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for PortfolioWeight
impl PartialOrd 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