Trait ammonia::AttributeFilter

source ·
pub trait AttributeFilter: Send + Sync {
    // Required method
    fn filter<'a>(&self, _: &str, _: &str, _: &'a str) -> Option<Cow<'a, str>>;
}
Expand description

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

See attribute_filter for more details.

Required Methods§

source

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.

Trait Implementations§

source§

impl Debug for dyn AttributeFilter

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Implementors§

source§

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