pub struct HtmlFormat { /* private fields */ }Expand description
Format implementation for HTML
Implementations§
Source§impl HtmlFormat
impl HtmlFormat
Sourcepub fn with_fancy_serif() -> Self
pub fn with_fancy_serif() -> Self
Create HTML format with fancy serif theme
Sourcepub fn with_modern() -> Self
pub fn with_modern() -> Self
Create HTML format with modern theme
Trait Implementations§
Source§impl Default for HtmlFormat
impl Default for HtmlFormat
Source§impl Format for HtmlFormat
impl Format for HtmlFormat
Source§fn description(&self) -> &str
fn description(&self) -> &str
Optional description of this format
Source§fn file_extensions(&self) -> &[&str]
fn file_extensions(&self) -> &[&str]
File extensions associated with this format (e.g., [“lex”], [“md”, “markdown”]) Read more
Source§fn supports_parsing(&self) -> bool
fn supports_parsing(&self) -> bool
Whether this format supports parsing (source → Document)
Source§fn supports_serialization(&self) -> bool
fn supports_serialization(&self) -> bool
Whether this format supports serialization (Document → source)
Source§fn parse(&self, _source: &str) -> Result<Document, FormatError>
fn parse(&self, _source: &str) -> Result<Document, FormatError>
Parse source text into a Document Read more
Source§fn serialize(&self, doc: &Document) -> Result<String, FormatError>
fn serialize(&self, doc: &Document) -> Result<String, FormatError>
Serialize a Document into source text Read more
Source§fn serialize_with_options(
&self,
doc: &Document,
options: &HashMap<String, String>,
) -> Result<SerializedDocument, FormatError>
fn serialize_with_options( &self, doc: &Document, options: &HashMap<String, String>, ) -> Result<SerializedDocument, FormatError>
Serialize a Document, optionally using extra parameters. Read more
Auto Trait Implementations§
impl Freeze for HtmlFormat
impl RefUnwindSafe for HtmlFormat
impl Send for HtmlFormat
impl Sync for HtmlFormat
impl Unpin for HtmlFormat
impl UnsafeUnpin for HtmlFormat
impl UnwindSafe for HtmlFormat
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more