pub struct PlainTextExportOptions {
pub quote_indent: bool,
pub page_breaks: bool,
pub strip_images: bool,
pub endnote_footnotes: bool,
}Fields§
§quote_indent: boolIndent blockquoted blocks four spaces per level, so quoted matter still reads as set-off in a format with no markup to say so.
page_breaks: boolEmit FORM_FEED before a block that asks to start a new page.
strip_images: boolDrop the U+FFFC that stands for an inline image.
Presentation only. A written-out .txt has no way to show a picture,
and the raw sentinel renders as an unmarked box — but it is also one
character of the document, so removing it shifts every offset after it.
Anything that addresses the text by position (a cursor, a search hit, a
comment’s anchor) must therefore leave it in, which is exactly the
difference between Self::addressable and Self::presentation.
endnote_footnotes: boolLift footnotes out of the flow and list them, numbered, at the end.
Presentation only, and for exactly the reason strip_images is. A
note’s body is real content in the document, sitting in the rope where
its definition was written, and the addressable view has to agree with
the document character for character. Moving those blocks to the end —
or worse, printing them twice — puts every offset after them wrong,
which is every search hit and every comment anchor below the note.
A written-out .txt has no page to put a footnote at the foot of, so
the endnote list is what a manuscript printed without markup has always
done.
Implementations§
Source§impl PlainTextExportOptions
impl PlainTextExportOptions
Sourcepub const fn addressable() -> PlainTextExportOptions
pub const fn addressable() -> PlainTextExportOptions
Nothing added — the addressable view, pinned to the document’s own search text. Offsets into it are offsets into the document, character for character.
Sourcepub const fn presentation() -> PlainTextExportOptions
pub const fn presentation() -> PlainTextExportOptions
Everything a written-out .txt wants.
Trait Implementations§
Source§impl Clone for PlainTextExportOptions
impl Clone for PlainTextExportOptions
Source§fn clone(&self) -> PlainTextExportOptions
fn clone(&self) -> PlainTextExportOptions
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for PlainTextExportOptions
Source§impl Debug for PlainTextExportOptions
impl Debug for PlainTextExportOptions
Source§impl Default for PlainTextExportOptions
impl Default for PlainTextExportOptions
Source§fn default() -> PlainTextExportOptions
fn default() -> PlainTextExportOptions
Source§impl<'de> Deserialize<'de> for PlainTextExportOptions
impl<'de> Deserialize<'de> for PlainTextExportOptions
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<PlainTextExportOptions, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<PlainTextExportOptions, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
impl Eq for PlainTextExportOptions
Source§impl PartialEq for PlainTextExportOptions
impl PartialEq for PlainTextExportOptions
Source§impl Serialize for PlainTextExportOptions
impl Serialize for PlainTextExportOptions
Source§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,
impl StructuralPartialEq for PlainTextExportOptions
Auto Trait Implementations§
impl Freeze for PlainTextExportOptions
impl RefUnwindSafe for PlainTextExportOptions
impl Send for PlainTextExportOptions
impl Sync for PlainTextExportOptions
impl Unpin for PlainTextExportOptions
impl UnsafeUnpin for PlainTextExportOptions
impl UnwindSafe for PlainTextExportOptions
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.