#[non_exhaustive]pub enum CodeType {
Show 16 variants
Bold,
Italic,
Underline,
Strike,
Superscript,
Subscript,
Code,
Style,
Link,
Image,
Linebreak,
Tab,
Field,
Footnoteref,
Placeholder,
Other,
}Expand description
What an inline code is, for chips and QA (“bold”, “link to x.com”). Closed list with a catch-all: match with a
wildcard arm; a JSON value this release does not know reads as Other. Serialised lowercase.
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.
Bold
Bold or strong.
Italic
Italic or emphasis.
Underline
Underline.
Strike
Strike-through.
Superscript
Superscript.
Subscript
Subscript.
Code
Inline code or a monospace span.
Style
A named character style (attr style).
Link
A hyperlink (attrs href, title).
Image
An inline image (attrs src, alt).
Linebreak
A line break.
Tab
A tab.
Field
A field (attr field: PAGE, DATE, TOC…).
Footnoteref
A footnote or endnote reference.
Placeholder
A placeholder (attr name).
Other
Anything else. An unknown type in a JSON file also reads as Other.
Implementations§
Trait Implementations§
impl Copy for CodeType
Source§impl<'de> Deserialize<'de> for CodeType
impl<'de> Deserialize<'de> for CodeType
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for CodeType
Source§impl Ord for CodeType
impl Ord for CodeType
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialOrd for CodeType
impl PartialOrd for CodeType
impl StructuralPartialEq for CodeType
Auto Trait Implementations§
impl Forget for CodeType
impl Freeze for CodeType
impl Move for CodeType
impl RefUnwindSafe for CodeType
impl Send for CodeType
impl Sync for CodeType
impl Unpin for CodeType
impl UnsafeUnpin for CodeType
impl UnwindSafe for CodeType
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