pub struct VolatilityWindow { /* private fields */ }Expand description
A simple observation-count volatility window.
Implementations§
Source§impl VolatilityWindow
impl VolatilityWindow
Sourcepub const fn new(length: usize) -> Result<Self, VolatilityError>
pub const fn new(length: usize) -> Result<Self, VolatilityError>
Creates a non-zero volatility window length.
§Errors
Returns VolatilityError::ZeroWindow when length is zero.
Trait Implementations§
Source§impl Clone for VolatilityWindow
impl Clone for VolatilityWindow
Source§fn clone(&self) -> VolatilityWindow
fn clone(&self) -> VolatilityWindow
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 VolatilityWindow
impl Debug for VolatilityWindow
Source§impl Hash for VolatilityWindow
impl Hash for VolatilityWindow
Source§impl Ord for VolatilityWindow
impl Ord for VolatilityWindow
Source§fn cmp(&self, other: &VolatilityWindow) -> Ordering
fn cmp(&self, other: &VolatilityWindow) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for VolatilityWindow
impl PartialEq for VolatilityWindow
Source§impl PartialOrd for VolatilityWindow
impl PartialOrd for VolatilityWindow
impl Copy for VolatilityWindow
impl Eq for VolatilityWindow
impl StructuralPartialEq for VolatilityWindow
Auto Trait Implementations§
impl Freeze for VolatilityWindow
impl RefUnwindSafe for VolatilityWindow
impl Send for VolatilityWindow
impl Sync for VolatilityWindow
impl Unpin for VolatilityWindow
impl UnsafeUnpin for VolatilityWindow
impl UnwindSafe for VolatilityWindow
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