pub struct DrawdownPoint { /* private fields */ }Expand description
A drawdown point with an optional label.
Implementations§
Source§impl DrawdownPoint
impl DrawdownPoint
Sourcepub const fn new(drawdown: Drawdown) -> DrawdownPoint
pub const fn new(drawdown: Drawdown) -> DrawdownPoint
Creates an unlabeled drawdown point.
Sourcepub fn with_label(
self,
label: impl AsRef<str>,
) -> Result<DrawdownPoint, DrawdownError>
pub fn with_label( self, label: impl AsRef<str>, ) -> Result<DrawdownPoint, DrawdownError>
Attaches a non-empty label.
§Errors
Returns DrawdownError::EmptyLabel when the trimmed label is empty.
Trait Implementations§
Source§impl Clone for DrawdownPoint
impl Clone for DrawdownPoint
Source§fn clone(&self) -> DrawdownPoint
fn clone(&self) -> DrawdownPoint
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 DrawdownPoint
impl Debug for DrawdownPoint
Source§impl PartialEq for DrawdownPoint
impl PartialEq for DrawdownPoint
Source§fn eq(&self, other: &DrawdownPoint) -> bool
fn eq(&self, other: &DrawdownPoint) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for DrawdownPoint
Auto Trait Implementations§
impl Freeze for DrawdownPoint
impl RefUnwindSafe for DrawdownPoint
impl Send for DrawdownPoint
impl Sync for DrawdownPoint
impl Unpin for DrawdownPoint
impl UnsafeUnpin for DrawdownPoint
impl UnwindSafe for DrawdownPoint
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