pub struct FibonacciConfig {Show 13 fields
pub levels: Vec<FibonacciLevel>,
pub level_width: f32,
pub level_style: LineStyle,
pub show_background: bool,
pub background_opacity: u8,
pub extend_left: bool,
pub extend_right: bool,
pub reverse: bool,
pub show_prices: Option<bool>,
pub show_levels: Option<bool>,
pub levels_as_percent: bool,
pub labels_on_left: bool,
pub logarithmic: bool,
}Expand description
Configuration for all Fibonacci levels in a drawing
Fields§
§levels: Vec<FibonacciLevel>Individual level configurations
level_width: f32Width of every level line, in points.
level_style: LineStyleLine pattern shared by every level.
show_background: boolShow background fill between levels
background_opacity: u8Background opacity (0-255)
extend_left: boolExtend lines to the left
extend_right: boolExtend lines to the right
reverse: boolReverse the direction (flip vertically)
show_prices: Option<bool>Show prices in level labels. None retains the tool’s legacy choice:
inherited from each level.
show_levels: Option<bool>Show the level value in labels; enabled when unset.
levels_as_percent: boolFormat level values as percentages rather than ratios.
labels_on_left: boolPlace labels at the left end of level lines instead of the right.
logarithmic: boolMeasure retracement and extension levels in logarithmic price when all anchors are positive.
Implementations§
Source§impl FibonacciConfig
impl FibonacciConfig
Sourcepub fn extension_default() -> Self
pub fn extension_default() -> Self
Extension levels (beyond 100%)
Sourcepub fn for_tool(tool: DrawingToolType) -> Self
pub fn for_tool(tool: DrawingToolType) -> Self
Initial levels for a tool, each in its own colour, with the background on at 20%. Retracements, extensions and channels list further ratios hidden. Existing drawings without a stored config keep their original renderer defaults; new tools store this table when constructed.
Sourcepub fn visible_levels(&self) -> impl Iterator<Item = &FibonacciLevel>
pub fn visible_levels(&self) -> impl Iterator<Item = &FibonacciLevel>
Get visible levels only
Trait Implementations§
Source§impl Clone for FibonacciConfig
impl Clone for FibonacciConfig
Source§fn clone(&self) -> FibonacciConfig
fn clone(&self) -> FibonacciConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for FibonacciConfig
impl Debug for FibonacciConfig
Source§impl Default for FibonacciConfig
impl Default for FibonacciConfig
Source§impl<'de> Deserialize<'de> for FibonacciConfig
impl<'de> Deserialize<'de> for FibonacciConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for FibonacciConfig
impl PartialEq for FibonacciConfig
Source§impl Serialize for FibonacciConfig
impl Serialize for FibonacciConfig
impl StructuralPartialEq for FibonacciConfig
Auto Trait Implementations§
impl Freeze for FibonacciConfig
impl RefUnwindSafe for FibonacciConfig
impl Send for FibonacciConfig
impl Sync for FibonacciConfig
impl Unpin for FibonacciConfig
impl UnsafeUnpin for FibonacciConfig
impl UnwindSafe for FibonacciConfig
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more