pub struct MermaidOptions {Show 41 fields
pub theme: MermaidThemeMode,
pub background_color: Option<String>,
pub responsive_svg: Option<bool>,
pub center_labels: Option<bool>,
pub output_dir: Option<PathBuf>,
pub puppeteer_config_file: Option<PathBuf>,
pub html_labels: Option<bool>,
pub theme_variables: Option<MermaidThemeVariables>,
pub font_family: Option<String>,
pub font_size: Option<u32>,
pub start_on_load: Option<bool>,
pub arrow_marker_absolute: Option<bool>,
pub deterministic_ids: Option<bool>,
pub deterministic_id_seed: Option<String>,
pub max_text_size: Option<u64>,
pub max_edges: Option<u64>,
pub security_level: Option<MermaidSecurityLevel>,
pub log_level: Option<MermaidLogLevel>,
pub look: Option<MermaidLook>,
pub layout: Option<MermaidLayout>,
pub hand_drawn_seed: Option<i64>,
pub wrap: Option<bool>,
pub flowchart: Option<MermaidFlowchartConfig>,
pub sequence: Option<MermaidSequenceConfig>,
pub gantt: Option<MermaidGanttConfig>,
pub er: Option<MermaidErConfig>,
pub pie: Option<MermaidPieConfig>,
pub class_diagram: Option<MermaidNodeRendererConfig>,
pub state: Option<MermaidNodeRendererConfig>,
pub git_graph: Option<MermaidGitGraphConfig>,
pub journey: Option<MermaidJourneyConfig>,
pub mindmap: Option<MermaidMindmapConfig>,
pub timeline: Option<MermaidTimelineConfig>,
pub sankey: Option<MermaidSankeyConfig>,
pub xy_chart: Option<MermaidXyChartConfig>,
pub block: Option<MermaidBlockConfig>,
pub requirement: Option<MermaidRequirementConfig>,
pub c4: Option<MermaidC4Config>,
pub architecture: Option<MermaidArchitectureConfig>,
pub radar: Option<MermaidRadarConfig>,
pub treemap: Option<MermaidTreemapConfig>,
}Expand description
Top-level mermaid configuration. Single flat object - every
mermaid.initialize() knob (themeVariables, flowchart, sequence,
gantt, look, layout, …) lives at the same level as the dmc-side
rendering knobs (responsiveSvg, centerLabels, outputDir, …). All
fields are typed end-to-end; no serde_json::Value catch-all.
None on CompileConfig.mermaid means “use built-in defaults”
(light + dark themes, htmlLabels:false, flowchart spacing).
Fields§
§theme: MermaidThemeModeTheme spec. Single string (one render -> chartSvg) or
mode -> theme map (per-mode render -> ${mode}Svg each).
Always stripped from the mermaid configFile in
build_mermaid_config - it’s a dmc-side knob, not a mermaid one.
background_color: Option<String>mmdc --backgroundColor. Default "transparent".
responsive_svg: Option<bool>Apply the responsive-width post-process. Default true.
center_labels: Option<bool>Inject text-anchor="middle" on label <text> / <tspan> so
flowchart node labels center inside their <rect> when
htmlLabels:false is in effect. Default true.
output_dir: Option<PathBuf>Disk cache directory.
puppeteer_config_file: Option<PathBuf>Forwarded to mmdc --puppeteerConfigFile.
html_labels: Option<bool>Override the bundled htmlLabels: false default. true switches
flowchart node labels back to HTML-in-<foreignObject>.
theme_variables: Option<MermaidThemeVariables>§font_family: Option<String>§font_size: Option<u32>§start_on_load: Option<bool>§arrow_marker_absolute: Option<bool>§deterministic_ids: Option<bool>§deterministic_id_seed: Option<String>§max_text_size: Option<u64>§max_edges: Option<u64>§security_level: Option<MermaidSecurityLevel>§log_level: Option<MermaidLogLevel>§look: Option<MermaidLook>§layout: Option<MermaidLayout>§hand_drawn_seed: Option<i64>§wrap: Option<bool>§flowchart: Option<MermaidFlowchartConfig>§sequence: Option<MermaidSequenceConfig>§gantt: Option<MermaidGanttConfig>§er: Option<MermaidErConfig>§pie: Option<MermaidPieConfig>§class_diagram: Option<MermaidNodeRendererConfig>class is a Rust keyword - exposed under class in JSON via
serde(rename).
state: Option<MermaidNodeRendererConfig>§git_graph: Option<MermaidGitGraphConfig>§journey: Option<MermaidJourneyConfig>§mindmap: Option<MermaidMindmapConfig>§timeline: Option<MermaidTimelineConfig>§sankey: Option<MermaidSankeyConfig>§xy_chart: Option<MermaidXyChartConfig>§block: Option<MermaidBlockConfig>§requirement: Option<MermaidRequirementConfig>§c4: Option<MermaidC4Config>§architecture: Option<MermaidArchitectureConfig>§radar: Option<MermaidRadarConfig>§treemap: Option<MermaidTreemapConfig>Trait Implementations§
Source§impl Clone for MermaidOptions
impl Clone for MermaidOptions
Source§fn clone(&self) -> MermaidOptions
fn clone(&self) -> MermaidOptions
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 MermaidOptions
impl Debug for MermaidOptions
Source§impl Default for MermaidOptions
impl Default for MermaidOptions
Source§fn default() -> MermaidOptions
fn default() -> MermaidOptions
Source§impl<'de> Deserialize<'de> for MermaidOptionswhere
MermaidOptions: Default,
impl<'de> Deserialize<'de> for MermaidOptionswhere
MermaidOptions: Default,
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>,
Auto Trait Implementations§
impl Freeze for MermaidOptions
impl RefUnwindSafe for MermaidOptions
impl Send for MermaidOptions
impl Sync for MermaidOptions
impl Unpin for MermaidOptions
impl UnsafeUnpin for MermaidOptions
impl UnwindSafe for MermaidOptions
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
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