Struct DrawdownPoint
pub struct DrawdownPoint { /* private fields */ }Expand description
A drawdown point with an optional label.
Implementations§
§impl DrawdownPoint
impl DrawdownPoint
pub const fn new(drawdown: Drawdown) -> DrawdownPoint
pub const fn new(drawdown: Drawdown) -> DrawdownPoint
Creates an unlabeled drawdown point.
pub 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§
§impl Clone for DrawdownPoint
impl Clone for DrawdownPoint
§fn clone(&self) -> DrawdownPoint
fn clone(&self) -> DrawdownPoint
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 more§impl Debug for DrawdownPoint
impl Debug for DrawdownPoint
§impl PartialEq for DrawdownPoint
impl PartialEq for DrawdownPoint
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