Struct ruma_html::SanitizerConfig
source · pub struct SanitizerConfig { /* private fields */ }
Expand description
Configuration to sanitize HTML tags and attributes.
Implementations§
source§impl SanitizerConfig
impl SanitizerConfig
sourcepub fn new() -> Self
pub fn new() -> Self
Constructs an empty SanitizerConfig
that will not filter any tag or attribute.
sourcepub fn strict() -> Self
pub fn strict() -> Self
Constructs a SanitizerConfig
that will filter tags or attributes not listed in the
Matrix specification.
It will not remove the reply fallback by default.
sourcepub fn compat() -> Self
pub fn compat() -> Self
Constructs a SanitizerConfig
that will filter tags or attributes not listed in the
Matrix specification, except a few for improved compatibility:
- The
matrix
scheme is allowed in links.
It will not remove the reply fallback by default.
sourcepub fn remove_reply_fallback(self) -> Self
pub fn remove_reply_fallback(self) -> Self
Remove the rich reply fallback.
Trait Implementations§
source§impl Clone for SanitizerConfig
impl Clone for SanitizerConfig
source§fn clone(&self) -> SanitizerConfig
fn clone(&self) -> SanitizerConfig
Returns a copy of the value. Read more
1.0.0 · 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 SanitizerConfig
impl Debug for SanitizerConfig
source§impl Default for SanitizerConfig
impl Default for SanitizerConfig
source§fn default() -> SanitizerConfig
fn default() -> SanitizerConfig
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl RefUnwindSafe for SanitizerConfig
impl Send for SanitizerConfig
impl Sync for SanitizerConfig
impl Unpin for SanitizerConfig
impl UnwindSafe for SanitizerConfig
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