#[non_exhaustive]pub struct HtmlOptions {
pub allow_dangerous_html: bool,
pub allow_dangerous_protocol: bool,
pub allow_any_img_src: bool,
pub gfm_tagfilter: bool,
pub tasklist_checkable: bool,
pub safe_raw_html_form: SafeRawHtmlForm,
pub tasklist_attr_order: TasklistAttrOrder,
}Expand description
HTML rendering options. The default is safe: raw HTML is escaped, dangerous link/image protocols are blanked, and task-list checkboxes are disabled.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.allow_dangerous_html: boolEmit raw HTML blocks/inlines verbatim.
allow_dangerous_protocol: boolKeep dangerous link/image protocols instead of blanking the attribute.
allow_any_img_src: boolLet image src values bypass the protocol filter.
gfm_tagfilter: boolApply the GFM tagfilter to raw HTML when dangerous HTML is enabled.
tasklist_checkable: boolOmit disabled="" from task-list checkbox inputs.
safe_raw_html_form: SafeRawHtmlFormSafe-mode raw HTML convention.
tasklist_attr_order: TasklistAttrOrderAttribute ordering convention for disabled task-list checkbox inputs.
Trait Implementations§
Source§impl Clone for HtmlOptions
impl Clone for HtmlOptions
Source§fn clone(&self) -> HtmlOptions
fn clone(&self) -> HtmlOptions
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for HtmlOptions
impl Debug for HtmlOptions
Source§impl Default for HtmlOptions
impl Default for HtmlOptions
impl Eq for HtmlOptions
Source§impl PartialEq for HtmlOptions
impl PartialEq for HtmlOptions
Source§fn eq(&self, other: &HtmlOptions) -> bool
fn eq(&self, other: &HtmlOptions) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for HtmlOptions
Auto Trait Implementations§
impl Freeze for HtmlOptions
impl RefUnwindSafe for HtmlOptions
impl Send for HtmlOptions
impl Sync for HtmlOptions
impl Unpin for HtmlOptions
impl UnsafeUnpin for HtmlOptions
impl UnwindSafe for HtmlOptions
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