pub struct DrawdownWindow { /* private fields */ }Expand description
A simple observation-count drawdown window.
Implementations§
Source§impl DrawdownWindow
impl DrawdownWindow
Sourcepub const fn new(length: usize) -> Result<DrawdownWindow, DrawdownError>
pub const fn new(length: usize) -> Result<DrawdownWindow, DrawdownError>
Creates a non-zero drawdown window length.
§Errors
Returns DrawdownError::ZeroWindow when length is zero.
Trait Implementations§
Source§impl Clone for DrawdownWindow
impl Clone for DrawdownWindow
Source§fn clone(&self) -> DrawdownWindow
fn clone(&self) -> DrawdownWindow
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 DrawdownWindow
Source§impl Debug for DrawdownWindow
impl Debug for DrawdownWindow
impl Eq for DrawdownWindow
Source§impl Hash for DrawdownWindow
impl Hash for DrawdownWindow
Source§impl Ord for DrawdownWindow
impl Ord for DrawdownWindow
Source§fn cmp(&self, other: &DrawdownWindow) -> Ordering
fn cmp(&self, other: &DrawdownWindow) -> Ordering
1.21.0 (const: unstable) · 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 DrawdownWindow
impl PartialEq for DrawdownWindow
Source§fn eq(&self, other: &DrawdownWindow) -> bool
fn eq(&self, other: &DrawdownWindow) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for DrawdownWindow
impl PartialOrd for DrawdownWindow
impl StructuralPartialEq for DrawdownWindow
Auto Trait Implementations§
impl Freeze for DrawdownWindow
impl RefUnwindSafe for DrawdownWindow
impl Send for DrawdownWindow
impl Sync for DrawdownWindow
impl Unpin for DrawdownWindow
impl UnsafeUnpin for DrawdownWindow
impl UnwindSafe for DrawdownWindow
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