pub enum FormatHint {
Markdown,
Plain,
Html,
}Expand description
Document format hint for DOCUMENT blocks.
Tells the renderer how to interpret the document body. This is a hint, not a guarantee — the body may contain mixed content.
┌──────┬──────────┐
│ Wire │ Format │
├──────┼──────────┤
│ 0x01 │ Markdown │
│ 0x02 │ Plain │
│ 0x03 │ Html │
└──────┴──────────┘Variants§
Implementations§
Source§impl FormatHint
impl FormatHint
Sourcepub fn to_wire_byte(self) -> u8
pub fn to_wire_byte(self) -> u8
Encode this variant as a single wire byte.
Sourcepub fn from_wire_byte(value: u8) -> Result<Self, TypeError>
pub fn from_wire_byte(value: u8) -> Result<Self, TypeError>
Decode a wire byte into this enum.
Returns Err(TypeError::InvalidEnumValue) if the byte
doesn’t match any known variant.
Trait Implementations§
Source§impl Clone for FormatHint
impl Clone for FormatHint
Source§fn clone(&self) -> FormatHint
fn clone(&self) -> FormatHint
Returns a duplicate of the value. Read more
1.0.0 · 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 FormatHint
impl Debug for FormatHint
Source§impl PartialEq for FormatHint
impl PartialEq for FormatHint
impl Copy for FormatHint
impl Eq for FormatHint
impl StructuralPartialEq for FormatHint
Auto Trait Implementations§
impl Freeze for FormatHint
impl RefUnwindSafe for FormatHint
impl Send for FormatHint
impl Sync for FormatHint
impl Unpin for FormatHint
impl UnsafeUnpin for FormatHint
impl UnwindSafe for FormatHint
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