#[non_exhaustive]pub enum WireInline {
Text {
text: String,
},
Bold {
children: Vec<WireInline>,
},
Italic {
children: Vec<WireInline>,
},
Code {
text: String,
},
Math {
text: String,
},
Reference {
ref_kind: RefKind,
target: String,
label: Option<String>,
},
}Expand description
One inline element. Wire form is a tagged object with "kind" selecting
the variant.
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.
Text
Plain text.
Bold
*bold* content.
Fields
§
children: Vec<WireInline>Italic
_italic_ content.
Fields
§
children: Vec<WireInline>Code
`code` content. Literal — no nested inlines.
Math
#math# content. Literal — no nested inlines.
Reference
[reference] content. The kind sub-discriminator (url, citation,
footnote, …) selects the semantic meaning of target.
Trait Implementations§
Source§impl Clone for WireInline
impl Clone for WireInline
Source§fn clone(&self) -> WireInline
fn clone(&self) -> WireInline
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 moreSource§impl Debug for WireInline
impl Debug for WireInline
Source§impl<'de> Deserialize<'de> for WireInline
impl<'de> Deserialize<'de> for WireInline
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
Source§impl PartialEq for WireInline
impl PartialEq for WireInline
Source§fn eq(&self, other: &WireInline) -> bool
fn eq(&self, other: &WireInline) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for WireInline
impl Serialize for WireInline
impl StructuralPartialEq for WireInline
Auto Trait Implementations§
impl Freeze for WireInline
impl RefUnwindSafe for WireInline
impl Send for WireInline
impl Sync for WireInline
impl Unpin for WireInline
impl UnsafeUnpin for WireInline
impl UnwindSafe for WireInline
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