pub enum AnnotationKind {
Bold,
Italic,
Underline,
Strikethrough,
Code,
Subscript,
Superscript,
Highlight,
Link {
url: String,
title: Option<String>,
},
}Expand description
The type of an inline text annotation.
Uses internally tagged representation ("annotation_type": "bold") for JSON serialization.
Variants§
Bold
Bold / strong emphasis.
Italic
Italic / emphasis.
Underline
Underline.
Strikethrough
Strikethrough / deleted text.
Code
Inline code.
Subscript
Subscript text.
Superscript
Superscript text.
Highlight
Highlighted / marked text.
Link
A hyperlink sourced from an <a href="..."> element.
Fields
§
url: StringThe URL from the href attribute, copied verbatim from the source HTML.
No URL decoding or normalization is performed: percent-encoded sequences, relative
paths, and protocol-relative URLs (//example.com) are all preserved exactly as
written in the source. Callers that need an absolute URL must resolve it against the
document base URL themselves.
Trait Implementations§
Source§impl Clone for AnnotationKind
impl Clone for AnnotationKind
Source§fn clone(&self) -> AnnotationKind
fn clone(&self) -> AnnotationKind
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 AnnotationKind
impl Debug for AnnotationKind
Source§impl Default for AnnotationKind
impl Default for AnnotationKind
Source§fn default() -> AnnotationKind
fn default() -> AnnotationKind
Returns the “default value” for a type. Read more
impl Eq for AnnotationKind
Source§impl PartialEq for AnnotationKind
impl PartialEq for AnnotationKind
Source§fn eq(&self, other: &AnnotationKind) -> bool
fn eq(&self, other: &AnnotationKind) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for AnnotationKind
Auto Trait Implementations§
impl Freeze for AnnotationKind
impl RefUnwindSafe for AnnotationKind
impl Send for AnnotationKind
impl Sync for AnnotationKind
impl Unpin for AnnotationKind
impl UnsafeUnpin for AnnotationKind
impl UnwindSafe for AnnotationKind
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.