pub struct Options {
pub br: bool,
pub esc_pre: bool,
pub remove_useless_newlines_in_pre: bool,
}
Expand description
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§
Source§impl Options
impl Options
Sourcepub const fn br(self, br: bool) -> Self
pub const fn br(self, br: bool) -> Self
Set whether to convert remaining line-breaks to <br>
elements.
Sourcepub const fn esc_pre(self, esc_pre: bool) -> Self
pub const fn esc_pre(self, esc_pre: bool) -> Self
Set whether to escape the inner HTML in <pre>
elements.
Sourcepub const fn remove_useless_newlines_in_pre(
self,
remove_useless_newlines_in_pre: bool,
) -> Self
pub const fn remove_useless_newlines_in_pre( self, remove_useless_newlines_in_pre: bool, ) -> Self
Set whether to remove useless newlines in the inner HTML of <pre>
elements.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Options
impl RefUnwindSafe for Options
impl Send for Options
impl Sync for Options
impl Unpin for Options
impl UnwindSafe for Options
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