pub struct CompositeStyle {
pub corner: Option<BaseStyle>,
pub border: Option<BaseStyle>,
pub arrow: Option<BaseStyle>,
pub edge: Option<BaseStyle>,
pub junction: Option<BaseStyle>,
pub back: Option<BaseStyle>,
pub subgraph: Option<BaseStyle>,
}Expand description
Component-specific style configuration
Each component can be styled independently using any BorderStyle:
corner- Box corners (┌┐└┘ for unicode, ╭╮╰╯ for rounded, ╔╗╚╝ for double, • for dots, * for stars, etc.)border- Box borders/lines (─│ for unicode, ═║ for double, ━┃ for heavy, etc.)arrow- Arrow heads (▼◀▶ for unicode, v<> for ascii)edge- Connection lines between boxesjunction- T-junctions where edges meet (┬┴├┤ for unicode, ╦╩╠╣ for double, etc.)back- Back edges for cycles (dotted/dashed lines)subgraph- Subgraph container borders (defaults to ascii for visual distinction)
Fields§
§corner: Option<BaseStyle>§border: Option<BaseStyle>§arrow: Option<BaseStyle>§edge: Option<BaseStyle>§junction: Option<BaseStyle>§back: Option<BaseStyle>§subgraph: Option<BaseStyle>Implementations§
Source§impl CompositeStyle
impl CompositeStyle
Sourcepub fn from_base(style: BaseStyle) -> Self
pub fn from_base(style: BaseStyle) -> Self
Create a CompositeStyle with all components set to the given base style
Sourcepub fn parse(s: &str) -> Self
pub fn parse(s: &str) -> Self
Parse a composite style string like “box:rounded,arrow:heavy,line:double”
Sourcepub fn to_style_chars(&self, fallback: BaseStyle) -> StyleChars
pub fn to_style_chars(&self, fallback: BaseStyle) -> StyleChars
Create a mixed StyleChars from component styles with a fallback
Sourcepub fn to_subgraph_chars(&self) -> &'static StyleChars
pub fn to_subgraph_chars(&self) -> &'static StyleChars
Get StyleChars for subgraph borders.
Subgraphs default to Heavy style for visual distinction from node boxes.
This can be overridden with --style="subgraph:ascii" etc.
Trait Implementations§
Source§impl Clone for CompositeStyle
impl Clone for CompositeStyle
Source§fn clone(&self) -> CompositeStyle
fn clone(&self) -> CompositeStyle
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 CompositeStyle
impl Debug for CompositeStyle
Source§impl Default for CompositeStyle
impl Default for CompositeStyle
Source§fn default() -> CompositeStyle
fn default() -> CompositeStyle
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for CompositeStyle
impl RefUnwindSafe for CompositeStyle
impl Send for CompositeStyle
impl Sync for CompositeStyle
impl Unpin for CompositeStyle
impl UnsafeUnpin for CompositeStyle
impl UnwindSafe for CompositeStyle
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