Skip to main content

AttributeFilter

Trait 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

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

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