pub enum WeightViolation {
NonFiniteWeight {
index: usize,
},
NegativeWeight {
index: usize,
weight: f64,
},
GrossExposureExceeded {
gross: f64,
cap: f64,
},
}Expand description
A specific way a weight vector violates the policy.
Variants§
NonFiniteWeight
A weight is NaN or infinite — an abusive/garbage vector.
NegativeWeight
A negative weight while shorts are disallowed.
GrossExposureExceeded
Gross exposure exceeded the leverage cap.
Trait Implementations§
Source§impl Clone for WeightViolation
impl Clone for WeightViolation
Source§fn clone(&self) -> WeightViolation
fn clone(&self) -> WeightViolation
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 moreSource§impl Debug for WeightViolation
impl Debug for WeightViolation
Source§impl PartialEq for WeightViolation
impl PartialEq for WeightViolation
Source§fn eq(&self, other: &WeightViolation) -> bool
fn eq(&self, other: &WeightViolation) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for WeightViolation
impl Serialize for WeightViolation
impl StructuralPartialEq for WeightViolation
Auto Trait Implementations§
impl Freeze for WeightViolation
impl RefUnwindSafe for WeightViolation
impl Send for WeightViolation
impl Sync for WeightViolation
impl Unpin for WeightViolation
impl UnsafeUnpin for WeightViolation
impl UnwindSafe for WeightViolation
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