[][src]Trait ammonia::AttributeFilter

pub trait AttributeFilter: Send + Sync {
    fn filter<'a>(&self, _: &str, _: &str, _: &'a str) -> Option<Cow<'a, str>>;
}

Types that implement this trait can be used to remove or rewrite arbitrary attributes.

See attribute_filter for more details.

Required methods

fn filter<'a>(&self, _: &str, _: &str, _: &'a str) -> Option<Cow<'a, str>>

Return None to remove the attribute. Return Some(str) to replace it with a new string.

Loading content...

Trait Implementations

impl Debug for dyn AttributeFilter[src]

Implementors

impl<T> AttributeFilter for T where
    T: for<'a> Fn(&str, &str, &'a str) -> Option<Cow<'a, str>> + Send + Sync + 'static, 
[src]

Loading content...