pub enum Signal {
Show 20 variants
NewLine,
Tab,
PossibleNewLine,
SpaceOrNewLine,
ExpectNewLine,
QueueStartIndent,
StartIndent,
FinishIndent,
StartNewLineGroup,
FinishNewLineGroup,
SingleIndent,
StartIgnoringIndent,
FinishIgnoringIndent,
StartResettingIndent,
FinishResettingIndent,
StartAlign(u8),
FinishAlign,
StartForceNoNewLines,
FinishForceNoNewLines,
SpaceIfNotTrailing,
}Variants§
NewLine
Signal that a new line should occur based on the printer settings.
Tab
Signal that a tab should occur based on the printer settings.
PossibleNewLine
Signal that the current location could be a newline when exceeding the line width.
SpaceOrNewLine
Signal that the current location should be a space, but could be a newline if exceeding the line width.
ExpectNewLine
Expect the next character to be a newline. If it’s not, force a newline.
QueueStartIndent
Queue a start indent to be set after the next written item.
StartIndent
Signal the start of a section that should be indented.
FinishIndent
Signal the end of a section that should be indented.
StartNewLineGroup
Signal the start of a group of print items that have a lower precedence for being broken up with a newline for exceeding the line width.
FinishNewLineGroup
Signal the end of a newline group.
SingleIndent
Signal that a single indent should occur based on the printer settings.
StartIgnoringIndent
Signal to the printer that it should stop using indentation.
FinishIgnoringIndent
Signal to the printer that it should start using indentation again.
StartResettingIndent
Signal the start of a section whose indentation starts from no indentation
instead of the current indentation, which can then be indented with StartIndent
(ex. to indent relative to text written as is while ignoring the indentation).
The indent levels in the section (ex. of an IndentLevel info) count from the
start of the section, so they shouldn’t be compared with the indent levels from
outside of it. The column numbers are the actual columns. A QueueStartIndent
from before the section is applied after it.
FinishResettingIndent
Signal the end of a section that reset the indentation, which restores the indentation from before. The indents and aligns started in the section must be finished first.
StartAlign(u8)
Signal the start of a section that’s aligned by the number of columns of spaces after the indentation (ex. to line up with text that isn’t at an indent level). The alignment always goes after the indentation, so with tabs it’s tabs then spaces.
The alignment isn’t part of the indent levels (ex. of an IndentLevel info),
but it’s included in the column numbers.
FinishAlign
Signal the end of the most recent section that aligns.
StartForceNoNewLines
Signal to the printer that it shouldn’t print any new lines.
FinishForceNoNewLines
Signal to the printer that it should finish not printing any new lines.
SpaceIfNotTrailing
Signal that a space should occur if not trailing.
Trait Implementations§
impl Copy for Signal
impl Eq for Signal
Source§impl<'a> IntoPrintItems<'a> for Signal
impl<'a> IntoPrintItems<'a> for Signal
fn into_print_items(self, arena: &'a Arena) -> PrintItems<'a>
impl StructuralPartialEq for Signal
Auto Trait Implementations§
impl Forget for Signal
impl Freeze for Signal
impl RefUnwindSafe for Signal
impl Send for Signal
impl Sync for Signal
impl Unpin for Signal
impl UnsafeUnpin for Signal
impl UnwindSafe for Signal
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,
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
key and return true if they are equal.