pub struct FormatConfig {
pub dedup_use: bool,
pub hoist_styles: bool,
pub sort_nodes: bool,
}Expand description
Configuration for format_document.
All transforms default to a safe, non-destructive subset.
Opt-in to structural transforms via explicit true fields.
Fields§
§dedup_use: boolRemove duplicate use: references on each node. Default: true.
hoist_styles: boolPromote repeated identical inline styles to top-level style {} blocks.
This is structurally destructive (adds new style names, rewrites nodes),
so it defaults to false — users must explicitly opt-in.
sort_nodes: boolReorder top-level nodes by kind: Group/Frame → Rect → Ellipse → Text → Path → Generic. Relative order within each kind is preserved. Default: true.
Trait Implementations§
Source§impl Clone for FormatConfig
impl Clone for FormatConfig
Source§fn clone(&self) -> FormatConfig
fn clone(&self) -> FormatConfig
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 FormatConfig
impl Debug for FormatConfig
Auto Trait Implementations§
impl Freeze for FormatConfig
impl RefUnwindSafe for FormatConfig
impl Send for FormatConfig
impl Sync for FormatConfig
impl Unpin for FormatConfig
impl UnsafeUnpin for FormatConfig
impl UnwindSafe for FormatConfig
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