[][src]Struct html_auto_p::Options

pub struct Options {
    pub br: bool,
    pub esc_pre: bool,
    pub remove_useless_newlines_in_pre: bool,
}

Options for the auto_p function.

Fields

br: bool

Whether to convert remaining line-breaks to <br> elements.

esc_pre: bool

Whether to escape the inner HTML in <pre> elements. This is useful when the inner HTML needs to be formatted and be wrapped into other non-<pre> elements.

remove_useless_newlines_in_pre: bool

Whether to remove useless newlines in the inner HTML of <pre> elements. This is useful to beautifully form code into <pre>\n...\n</pre> without worrying about the adjacent newlines' effects.

Implementations

impl Options[src]

pub const fn new() -> Self[src]

Create default options. (All false)

pub const fn br(self, br: bool) -> Self[src]

Set whether to convert remaining line-breaks to <br> elements.

pub const fn esc_pre(self, esc_pre: bool) -> Self[src]

Set whether to escape the inner HTML in <pre> elements.

pub const fn remove_useless_newlines_in_pre(
    self,
    remove_useless_newlines_in_pre: bool
) -> Self
[src]

Set whether to remove useless newlines in the inner HTML of <pre> elements.

Trait Implementations

impl Clone for Options[src]

impl Debug for Options[src]

impl Default for Options[src]

Auto Trait Implementations

impl RefUnwindSafe for Options

impl Send for Options

impl Sync for Options

impl Unpin for Options

impl UnwindSafe for Options

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.