pub struct DocLayout {
pub style_rules: Vec<LayoutStyleRule>,
pub order_rules: Vec<LayoutOrderRule>,
pub fallback_style: LayoutStyle,
}Expand description
Declarative layout plan for projecting a document to source.
Fields§
§style_rules: Vec<LayoutStyleRule>Exact-path style rules.
order_rules: Vec<LayoutOrderRule>Ordering directives by parent path.
fallback_style: LayoutStyleFallback style when no style rule matches.
Implementations§
Source§impl DocLayout
impl DocLayout
pub fn new() -> Self
pub fn add_style_rule(&mut self, path: Vec<PathSegment>, style: LayoutStyle)
pub fn add_style_rule_with_constraints( &mut self, path: Vec<PathSegment>, style: LayoutStyle, variant_constraints: Vec<VariantConstraint>, )
pub fn add_order_rule( &mut self, parent_path: Vec<PathSegment>, child_order: Vec<PathSegment>, append_unlisted: bool, )
Trait Implementations§
impl Eq for DocLayout
impl StructuralPartialEq for DocLayout
Auto Trait Implementations§
impl Freeze for DocLayout
impl RefUnwindSafe for DocLayout
impl Send for DocLayout
impl Sync for DocLayout
impl Unpin for DocLayout
impl UnsafeUnpin for DocLayout
impl UnwindSafe for DocLayout
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.