Skip to main content

BodyMarkup

Trait BodyMarkup 

Source
pub trait BodyMarkup: Send + Sync {
    // Required methods
    fn written(&self, content: &str) -> String;
    fn read(&self, content: &str) -> String;
}
Expand description

Markup a destination’s bodies carry — an anchor a reader addresses a heading by, or a collapsible section in the destination’s own spelling — which the engine hands a source when it builds it.

A source given one applies written to every body it sends its backend and read to every body it reads back, so what the engine reads through the source is the body as it was authored. Defaulted away entirely: a source given none stores what it is given.

Required Methods§

Source

fn written(&self, content: &str) -> String

content as the backend is sent it.

Source

fn read(&self, content: &str) -> String

content read from the backend, with exactly the markup written adds removed.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§