pub enum CMarkItem {
Parsed {
event: Event<'static>,
range: Range<usize>,
text_source: TextSource,
},
Created {
event: Event<'static>,
note: Cow<'static, str>,
},
Modified {
event: Event<'static>,
nodes: Box<[Arc<CMarkItem>]>,
note: Cow<'static, str>,
},
Removed {
nodes: Box<[Arc<CMarkItem>]>,
note: Cow<'static, str>,
},
Noted {
node: Arc<CMarkItem>,
note: Cow<'static, str>,
},
}
Expand description
An enum that store Markdown event, its origin, and modifications. The event modification tree is stored to improve error messages.
Variants§
Parsed
A Markdown event parsed from the specified text source.
Fields
§
text_source: TextSource
Text source.
Created
A Markdown event created by data transform functions.
Fields
Modified
A Markdown event created from other Markdown events.
Fields
Removed
A removed Markdown events.
Fields
Noted
A non-modified Markdown event that noted by data transform function.
Implementations§
Source§impl CMarkItem
impl CMarkItem
Sourcepub fn new(event: Event<'static>, note: Cow<'static, str>) -> Arc<Self>
pub fn new(event: Event<'static>, note: Cow<'static, str>) -> Arc<Self>
Creates CMarkItem
with the specified Event and its note.
Trait Implementations§
impl StructuralPartialEq for CMarkItem
Auto Trait Implementations§
impl Freeze for CMarkItem
impl RefUnwindSafe for CMarkItem
impl Send for CMarkItem
impl Sync for CMarkItem
impl Unpin for CMarkItem
impl UnwindSafe for CMarkItem
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