Enum readme_sync::CMarkItem[][src]

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

Fields

event: Event<'static>

Parsed Markdown event.

range: Range<usize>

The corresponding range of the event in the source text.

text_source: TextSource

Text source.

A Markdown event parsed from the specified text source.

Created

Fields

event: Event<'static>

Created Markdown event.

note: Cow<'static, str>

Data transformation note.

A Markdown event created by data transform functions.

Modified

Fields

event: Event<'static>

A Markdown event created from other events.

nodes: Box<[Arc<CMarkItem>]>

Source CMarkItems.

note: Cow<'static, str>

Data transformation note.

A Markdown event created from other Markdown events.

Removed

Fields

nodes: Box<[Arc<CMarkItem>]>

Removed CMarkItems.

note: Cow<'static, str>

Data transformation note.

A removed Markdown events.

Noted

Fields

node: Arc<CMarkItem>

Noted CMarkItem.

note: Cow<'static, str>

Data transformation note.

A non-modified Markdown event that noted by data transform function.

Implementations

Creates CMarkItem with the specified Event and its note.

Creates CMarkItem as an event parsed from the specified text source range.

Returns the event or None if it is removed.

Returns a Vec of event spans.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.