#[non_exhaustive]pub enum LineKindMismatch {
IslandNotOneSlot,
RuleNotEmpty,
CodeHasSlot,
}Expand description
The way a line’s text can contradict its LineKind. Para and Heading
carry arbitrary text including slots (an inline image is a slot in a Para),
so only the three kinds whose contract names their content constrain it.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
IslandNotOneSlot
LineKind::Island whose text is not exactly one ISLAND_SLOT.
RuleNotEmpty
LineKind::Rule carrying text: the break is the line itself.
CodeHasSlot
LineKind::Code carrying an ISLAND_SLOT. A fence emits its text
verbatim, so the slot lands raw in the output and re-imports as nothing:
the island and its slot both vanish.
Trait Implementations§
Source§impl Clone for LineKindMismatch
impl Clone for LineKindMismatch
Source§fn clone(&self) -> LineKindMismatch
fn clone(&self) -> LineKindMismatch
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for LineKindMismatch
Source§impl Debug for LineKindMismatch
impl Debug for LineKindMismatch
impl Eq for LineKindMismatch
Source§impl PartialEq for LineKindMismatch
impl PartialEq for LineKindMismatch
impl StructuralPartialEq for LineKindMismatch
Auto Trait Implementations§
impl Freeze for LineKindMismatch
impl RefUnwindSafe for LineKindMismatch
impl Send for LineKindMismatch
impl Sync for LineKindMismatch
impl Unpin for LineKindMismatch
impl UnsafeUnpin for LineKindMismatch
impl UnwindSafe for LineKindMismatch
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.