enum AttributeIndent {
NoneAttributesWritten,
WriteSpaces(usize),
Spaces(usize),
WriteConfigured(usize),
Configured(usize),
}
Expand description
Track indent inside elements state
stateDiagram-v2
[*] --> NoneAttributesWritten
NoneAttributesWritten --> Spaces : .with_attribute()
NoneAttributesWritten --> WriteConfigured : .new_line()
Spaces --> Spaces : .with_attribute()
Spaces --> WriteSpaces : .new_line()
WriteSpaces --> Spaces : .with_attribute()
WriteSpaces --> WriteSpaces : .new_line()
Configured --> Configured : .with_attribute()
Configured --> WriteConfigured : .new_line()
WriteConfigured --> Configured : .with_attribute()
WriteConfigured --> WriteConfigured : .new_line()
Variants§
NoneAttributesWritten
Initial state. ElementWriter
was just created and no attributes written yet
WriteSpaces(usize)
Write specified count of spaces to indent before writing attribute in with_attribute()
Spaces(usize)
Keep space indent that should be used if new_line()
would be called
WriteConfigured(usize)
Write specified count of indent characters before writing attribute in with_attribute()
Configured(usize)
Keep indent that should be used if new_line()
would be called
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AttributeIndent
impl RefUnwindSafe for AttributeIndent
impl Send for AttributeIndent
impl Sync for AttributeIndent
impl Unpin for AttributeIndent
impl UnwindSafe for AttributeIndent
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