Enum MarkType
pub enum MarkType {
Bold,
Italic,
Underline,
Strikethrough,
Code,
Link {
url: String,
},
Comment {
author: String,
content: String,
},
Highlight {
color: String,
},
Custom {
name: String,
value: String,
},
}Expand description
The type/style of a formatting mark.
Variants§
Bold
Bold text.
Italic
Italic text.
Underline
Underlined text.
Strikethrough
Strikethrough text.
Code
Code/monospace text.
Link
A hyperlink with URL.
Comment
A comment/annotation with author and content.
Highlight
Highlight with a color.
Custom
Custom mark type for extensibility.
Implementations§
§impl MarkType
impl MarkType
pub fn conflicts_with(&self, other: &MarkType) -> bool
pub fn conflicts_with(&self, other: &MarkType) -> bool
Check if this mark type conflicts with another. Conflicting marks cannot overlap.
Trait Implementations§
§impl<'de> Deserialize<'de> for MarkType
impl<'de> Deserialize<'de> for MarkType
§fn deserialize<__D>(
__deserializer: __D,
) -> Result<MarkType, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<MarkType, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
§impl Serialize for MarkType
impl Serialize for MarkType
§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl Eq for MarkType
impl StructuralPartialEq for MarkType
Auto Trait Implementations§
impl Freeze for MarkType
impl RefUnwindSafe for MarkType
impl Send for MarkType
impl Sync for MarkType
impl Unpin for MarkType
impl UnwindSafe for MarkType
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